library(dplyr) library(readxl) titanic <- read_xlsx(“~/wfed540/titanic2.xlsx”) titanic
glimpse(titanic)
fsurvivors <- filter(select(titanic,survived)) fsurvivors
fsurvivors%>% group_by (survived, “female”) summarise(fsurvivors, “female”, na.rm=TRUE)
glimpse(fsurvivors)
age2 <- filter(select(titanic, age)) age2
glimpse(age2)
titanic <- table(age>10) titanic
age2%>% summarise(min_age=min(age), max_age=max(age), avg_age=mean(age))
`````