Skip to contents

The sinking of the Titanic is one of the most infamous shipwrecks in history. On April 15, 1912, during her maiden voyage, the widely considered “unsinkable” RMS Titanic sank after colliding with an iceberg. Unfortunately, there weren’t enough lifeboats for everyone onboard, resulting in the death of 1502 out of 2224 passengers and crew. While there was some element of luck involved in surviving, it seems some groups of people were more likely to survive than others. In this challenge, we ask you to build a predictive model that answers the question: “what sorts of people were more likely to survive?” using passenger data (ie name, age, gender, socio-economic class, etc).

Usage

data(titanic)

Format

An object of class "data.frame"

survival

Survival

pclass

Ticket class

sex

Sex

Age

Age in years

sibsp

number of siblings / spouses

parch

number of parents / children

ticket

Ticket number

fare

Passenger fare

cabin

Cabin Number

cabintype

Type of cabin

embarked

Port of Embarkation

References

This data set sourced from https://www.kaggle.com/c/titanic/data?select=train.csv

Examples


data(titanic)
head(titanic)
#>   PassengerId Survived Pclass
#> 1           1        0      3
#> 2           2        1      1
#> 3           3        1      3
#> 4           4        1      1
#> 5           5        0      3
#> 6           6        0      3
#>                                                  Name    Sex Age SibSp Parch
#> 1                             Braund, Mr. Owen Harris   male  22     1     0
#> 2 Cumings, Mrs. John Bradley (Florence Briggs Thayer) female  38     1     0
#> 3                              Heikkinen, Miss. Laina female  26     0     0
#> 4        Futrelle, Mrs. Jacques Heath (Lily May Peel) female  35     1     0
#> 5                            Allen, Mr. William Henry   male  35     0     0
#> 6                                    Moran, Mr. James   male  NA     0     0
#>             Ticket    Fare   Cabin Embarked Cabintype
#> 1        A/5 21171  7.2500 Missing        S   Missing
#> 2         PC 17599 71.2833     C85        C         C
#> 3 STON/O2. 3101282  7.9250 Missing        S   Missing
#> 4           113803 53.1000    C123        S         C
#> 5           373450  8.0500 Missing        S   Missing
#> 6           330877  8.4583 Missing        Q   Missing