In this chapter, let's use the Titanic dataset, which is available on the Internet and also hosted on GitHub, to implement various techniques. Place the dataset in the current working directory in R; before this, first set the working directory accordingly using the setwd()
command. The setwd()
function is used to specify the location that should be considered as the current working directory. Now, read the data using the read.csv
function and store it in a data frame. In this book, we have named the data frame tdata
. The various details that are present in the dataset, which is hosted on GitHub, are as follows:
tdata<- read.csv("titanic.csv") names(tdata)
The output of the preceding command is as follows:
These are the various columns captured in the dataset. The explanation of these variables is given. For more detailed understanding about the dataset, visit https://www.kaggle.com/c/titanic/data. We have used the file named train.csv
for our learning purpose.
The variable...