# NOT RUN {
t.test(time ~ eruption, data = Faithful)
hist(Faithful$time, xlab = "wait time", main = "", freq = FALSE)
lines(density(Faithful$time))
# }
# NOT RUN {
library(ggplot2)
ggplot2::ggplot(data = Faithful, aes(x = time, y = ..density..)) +
geom_histogram(binwidth = 5, fill = "pink", col = "black") +
geom_density() +
theme_bw() +
labs(x = "wait time")
# }
Run the code above in your browser using DataLab