Learn R Programming

PASWR2 (version 1.0.5)

WATER: Sodium Content of Water

Description

An independent agency measures the sodium content in 20 samples from source x and in 10 samples from source y and stores them in the data frame WATER.

Usage

WATER

Arguments

Format

A data frame with 30 observations on the following 4 variables:

  • x (sodium content measured in mg/L)

  • y (sodium content measured in mg/L)

  • sodium (combined sodium content measured in mg/L)

  • source (a factor with levels x and y)

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 {
ggplot(data = WATER, aes(x = sodium, y = ..density.., fill = source)) + 
geom_density(alpha = 0.2)
t.test(sodium ~ source, data = WATER, alternative = "less")
# }

Run the code above in your browser using DataLab