The R Project SVN R

Rev

Rev 68948 | Rev 88388 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 71661
Line 1... Line 1...
1
% File src/library/datasets/man/precip.Rd
1
% File src/library/datasets/man/precip.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2007 R Core Team
3
% Copyright 1995-2016 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{precip}
6
\name{precip}
7
\docType{data}
7
\docType{data}
8
\alias{precip}
8
\alias{precip}
Line 21... Line 21...
21
\references{
21
\references{
22
  McNeil, D. R. (1977)
22
  McNeil, D. R. (1977)
23
  \emph{Interactive Data Analysis}.
23
  \emph{Interactive Data Analysis}.
24
  New York: Wiley.
24
  New York: Wiley.
25
}
25
}
-
 
26
\note{
-
 
27
  The dataset version up to Nov.16, 2016 had a typo in \code{"Cincinnati"}'s
-
 
28
  name.  The examples show how to recreate that version.
-
 
29
}
26
\examples{
30
\examples{
27
require(graphics)
31
require(graphics)
28
dotchart(precip[order(precip)], main = "precip data")
32
dotchart(precip[order(precip)], main = "precip data")
29
title(sub = "Average annual precipitation (in.)")
33
title(sub = "Average annual precipitation (in.)")
-
 
34
 
-
 
35
## Old ("wrong") version of dataset (just name change):
-
 
36
precip.O <- local({
-
 
37
   p <- precip; names(p)[names(p) == "Cincinnati"] <- "Cincinati" ; p })
-
 
38
stopifnot(all(precip == precip.O),
-
 
39
	  match("Cincinnati", names(precip)) == 46,
-
 
40
	  identical(names(precip)[-46], names(precip.O)[-46]))
30
}
41
}
31
\keyword{datasets}
42
\keyword{datasets}