Learn R Programming

datasets (version 3.4.3)

precip: Annual Precipitation in US Cities

Description

The average amount of precipitation (rainfall) in inches for each of 70 United States (and Puerto Rico) cities.

Usage

precip

Arguments

Format

A named vector of length 70.

References

McNeil, D. R. (1977) Interactive Data Analysis. New York: Wiley.

Examples

Run this code
# NOT RUN {
require(graphics)
dotchart(precip[order(precip)], main = "precip data")
title(sub = "Average annual precipitation (in.)")

## Old ("wrong") version of dataset (just name change):
precip.O <- local({
   p <- precip; names(p)[names(p) == "Cincinnati"] <- "Cincinati" ; p })
stopifnot(all(precip == precip.O),
	  match("Cincinnati", names(precip)) == 46,
	  identical(names(precip)[-46], names(precip.O)[-46]))
# }

Run the code above in your browser using DataLab