Increasing Decimal Positions - Swirl - r Programming Environment 12 - Data Manipulation
问题 I am working on a question from swirl, r Programming Environment 12 Data Manipulation. I cannot figure out how to get r to give me the right number of digits after the decimal place. My code: titanic_4 <- titanic %>% select(Survived, Pclass, Age, Sex) %>% filter(!is.na(Age)) %>% mutate(agecat = cut(Age, breaks = c(0, 14.99, 50, 150), include.lowest = TRUE, labels = c("Under 15", "15 to 50", "Over 50"))) %>% group_by(Pclass,agecat,Sex) %>% summarize(N=n(), survivors = sum(Survived))%>% mutate