Cabin Position may affect Survival


# This R script will run on our backend. You can write arbitrary code here!

# Many standard libraries are already installed, such as randomForest
#library(randomForest)

# The train and test data is stored in the ../input directory
train <- read.csv("../input/train.csv",na.strings=c('NA',''), stringsAsFactors=F)
test  <- read.csv("../input/test.csv",na.strings=c('NA',''), stringsAsFactors=F)
head(train)

#Extract Cabin Num from Cabin 
#train$CabinNum<-sapply(train$Cabin,function(x) strsplit(x,'[A-Z]')[[1]][2])
#train$CabinNum<-as.numeric(train$CabinNum)
#train$CabinPos100 as End
#train$CabinPos[train$CabinNum<50]=50 & train$CabinNum<100]=100]<-'End'
#train<-train[!is.na(train$CabinNum),]
#train$CabinPos<-factor(train$CabinPos)
#library(ggplot2)
#ggplot(train,aes(x=CabinNum,fill=factor(Survived)))+geom_density(alpha=0.6)+labs(x='Cabin Number')
#plot(aggregate(Survived~CabinPos,train,mean))
                

Source: Cabin Position may affect Survival

Via: Google Alert for ML