Survival of passengers on the Titanic. This data set provides information on the fate of passengers on the fatal maiden voyage of the ocean liner "Titanic". Columns are economic status (Class), Sex, Age and Survived.

It is the data set used in the Datanovia tutorial “Descriptive Statistics for Categorical Data in R: Contingency Tables” (https://www.datanovia.com/learn/biostatistics/categorical/categorical-descriptive-statistics-in-r).

data("titanic.raw")

Format

A data frame with 2201 rows and 4 columns.

Class

the passenger's economic status, "1st", "2nd", "3rd" or "Crew".

Sex

the passenger's sex, "Male" or "Female".

Age

the age category, "Child" or "Adult".

Survived

whether the passenger survived, "No" or "Yes".

Source

Derived from the Titanic data set in base R, expanded to one row per passenger.

Examples

data(titanic.raw)
with(titanic.raw, table(Class, Survived))
#>       Survived
#> Class   No Yes
#>   1st  122 203
#>   2nd  167 118
#>   3rd  528 178
#>   Crew 673 212