apply(Titanic, c("Sex", "Survived"), sum)