Learn R Programming

BSDA (version 1.2.0)

Faithful: Waiting times between successive eruptions of the Old Faithful geyser

Description

Data for Exercise 5.12 and 5.111

Usage

Faithful

Arguments

Format

A data frame/tibble with 299 observations on two variables

time

a numeric vector

eruption

a factor with levels 1 and 2

References

Kitchens, L. J. (2003) Basic Statistics and Data Analysis. Pacific Grove, CA: Brooks/Cole, a division of Thomson Learning.

Examples

Run this code
# 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