# R-program for Supplementary Exercises 1.51 and 1.77 of IPS7e surv <- read.csv("R:/Chapter 1/ex01_051.csv") summary(surv) mean(surv[["days"]]) sd(surv[["days"]]) stem(surv[["days"]]) hist(surv[["days"]]) boxplot(surv) # note: because several functions above needed a vector argument instead of a data frame, # it would have been easier to extract the days as a vector on its own, and use that instead, e.g. days <- surv[["days"]] # or alternatively just the first variable of the data frame days <- surv[[1]] mean(days) sd(days) stem(days) hist(days) boxplot(days)