R Dataset / Package datasets / precip


On this R-data statistics page, you will find information about the precip data set which pertains to Annual Precipitation in US Cities. The precip data set is found in the datasets R package. You can load the precip data set in R by issuing the following command at the console data("precip"). This will load the data into a variable called precip. If R says the precip data set is not found, you can try installing the package by issuing this command install.packages("datasets") and then attempt to reload the data. If you need to download R, you can go to the R project website. You can download a CSV (comma separated values) version of the precip R data set. The size of this file is about 328 bytes.

Annual Precipitation in US Cities


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




A named vector of length 70.


The dataset version up to Nov.16, 2016 had a typo in "Cincinnati"'s name. The examples show how to recreate that version.


Statistical Abstracts of the United States, 1975.


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


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]))

Dataset imported from https://www.r-project.org.

Title Authored on Content type
OpenIntro Statistics Dataset - dream August 9, 2020 - 12:25 PM Dataset
OpenIntro Statistics Dataset - winery_cars August 9, 2020 - 2:38 PM Dataset
R Dataset / Package HSAUR / toothpaste March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HSAUR / pottery March 9, 2018 - 1:06 PM Dataset
R Dataset / Package HistData / Guerry March 9, 2018 - 1:06 PM Dataset
<iframe src="https://r-data.pmagunia.com/iframe/r-dataset-package-datasets-precip.html" frameBorder="0" width="100%" height="307px" />
Attachment Size
dataset-95057.csv 328 bytes
Dataset License
GNU General Public License v2.0
Documentation License
GNU General Public License v2.0

This documentation is licensed under GPLv3 or later.