Learn R Programming

PASWR2 (version 1.0.5)

APPLE: Apple Hardness

Description

An experiment was undertaken where seventeen apples were randomly selected from an orchard (fresh) and measured for hardness. Seventeen apples were also randomly selected from a warehouse (warehouse) where the apples had been stored for one week and measured for hardness.

Usage

APPLE

Arguments

Format

A data frame with 34 observations on the following two variables:

  • hardness (hardness rating measured in \(\texttt{kg}/\texttt{meter}^2\) for both the fresh and warehouse apples)

  • location (factor with two levels fresh and warehouse)

References

Ugarte, M. D., Militino, A. F., and Arnholt, A. T. 2015. Probability and Statistics with R, Second Edition. Chapman & Hall / CRC.

Examples

Run this code
# NOT RUN {
# ggplot2 approach
ggplot(data = APPLE, aes(sample = hardness)) + stat_qq() + facet_grid(. ~ location)
ggplot(data = APPLE, aes(sample = hardness, color = location)) + stat_qq()
ggplot(data = APPLE, aes(x = hardness, fill = location)) + geom_density(alpha = 0.4) + 
scale_fill_brewer()
# lattice approach
qqmath(~hardness|location, data = APPLE)
qqmath(~hardness, group = location, type = c('p', 'r'), auto.key = TRUE, data = APPLE)
# }

Run the code above in your browser using DataLab