Examples for 'datasets::Titanic'


Survival of passengers on the Titanic

Aliases: Titanic

Keywords: datasets

### ** Examples

require(graphics)
mosaicplot(Titanic, main = "Survival on the Titanic")
plot of chunk example-datasets-Titanic-1
## Higher survival rates in children?
apply(Titanic, c(3, 4), sum)
       Survived
Age       No Yes
  Child   52  57
  Adult 1438 654
## Higher survival rates in females?
apply(Titanic, c(2, 4), sum)
        Survived
Sex        No Yes
  Male   1364 367
  Female  126 344
## Use loglm() in package 'MASS' for further analysis ...

[Package datasets version 4.2.3 Index]