Answer:
# install.packages ("gridBase")
# install.packages ("gridExtra")
library (gridBase) # load the gridBase package into memory
library (gridExtra) # load the gridExtra package into memory
h2 <- ggplot (Daphne, aes (x = Daphne)) + # Configure ggplot
geom_histogram (bins = 10, color = "gray", fill = "red") + # select geom_histogram
annotate ("text", x = Inf, y = Inf, label = "Containers = 10", hjust = 1.5, vjust = 5) +
xlab ("Peak size in mm") + # x-axis label
ylab ("Number of birds") + # label y axis
ggtitle (titleDaphne) # create the title
h3 <- ggplot (Daphne, aes (x = Daphne)) +
geom_histogram (bins = 25, color = "gray", fill = "red") +
annotate ("text", x = Inf, y = Inf, label = "Containers = 25", hjust = 1.5, vjust = 5) +
xlab ("Peak size in mm") + # x-axis label
ylab ("Number of birds") + # label y axis
ggtitle (titleDaphne) # create the title
h4 <- ggplot (Daphne, aes (x = Daphne)) +
geom_histogram (bins = 100, color = "gray", fill = "red") +
annotate ("text", x = Inf, y = Inf, label = "Containers = 100", hjust = 1.5, vjust = 5) +
xlab ("Peak size in mm") + # x-axis label
ylab ("Number of birds") + # label y axis
ggtitle (titleDaphne) # create the title
grid.arrange (h2, h3, h4) # print everything on the same page