R code related to Titanic Prediction Competition