Skip to content

Commit b039d7d

Browse files
author
smeyer
committed
correct misspelled row.names(LifeCycleSavings)
git-svn-id: https://svn.r-project.org/R/trunk@88215 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent d52deec commit b039d7d

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

doc/NEWS.Rd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585

8686
\I{Relatedly}, changing the \code{environment()} of a primitive function
8787
does no longer happen and gives a warning (to become an error, later).
88+
89+
\item Dataset \code{LifeCycleSavings} had a misspelled row name:
90+
\code{"Guatamala"} was corrected to \code{"Guatemala"}.
8891
}
8992
}
9093

src/library/datasets/data/LifeCycleSavings.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LifeCycleSavings <-
3030
row.names = c("Australia", "Austria",
3131
"Belgium", "Bolivia", "Brazil", "Canada", "Chile", "China", "Colombia",
3232
"Costa Rica", "Denmark", "Ecuador", "Finland", "France", "Germany", "Greece",
33-
"Guatamala", "Honduras", "Iceland", "India", "Ireland", "Italy", "Japan",
33+
"Guatemala", "Honduras", "Iceland", "India", "Ireland", "Italy", "Japan",
3434
"Korea", "Luxembourg", "Malta", "Norway", "Netherlands", "New Zealand",
3535
"Nicaragua", "Panama", "Paraguay", "Peru", "Philippines", "Portugal",
3636
"South Africa", "South Rhodesia", "Spain", "Sweden", "Switzerland",

src/library/datasets/man/LifeCycleSavings.Rd

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% File src/library/datasets/man/LifeCycleSavings.Rd
22
% Part of the R package, https://www.R-project.org
3-
% Copyright 1995-2007 R Core Team
3+
% Copyright 1995-2025 R Core Team
44
% Distributed under GPL 2 or later
55

66
\name{LifeCycleSavings}
@@ -23,7 +23,7 @@
2323
}
2424
}
2525
\source{
26-
The data were obtained from Belsley, Kuh and Welsch (1980).
26+
The data were obtained from Belsley, Kuh and Welsch (1980, pp.\sspace{}41--42).
2727
They in turn obtained the data from Sterling (1977).
2828
}
2929
\details{
@@ -36,6 +36,10 @@
3636
The data are averaged over the decade 1960--1970 to remove the
3737
business cycle or other short-term fluctuations.
3838
}
39+
\note{
40+
The dataset in \R < 4.6.0 had a typo in the row name \code{"Guatemala"}.
41+
The examples show how to recreate that version.
42+
}
3943
\references{
4044
Sterling, Arnie (1977) Unpublished BS Thesis.
4145
Massachusetts Institute of Technology.
@@ -50,5 +54,10 @@ pairs(LifeCycleSavings, panel = panel.smooth,
5054
main = "LifeCycleSavings data")
5155
fm1 <- lm(sr ~ pop15 + pop75 + dpi + ddpi, data = LifeCycleSavings)
5256
summary(fm1)
57+
58+
## recreate pre-4.6 dataset with a misspelled row name
59+
idx <- which(row.names(LifeCycleSavings) == "Guatemala")
60+
stopifnot(length(idx) == 1)
61+
LCS <- LifeCycleSavings; row.names(LCS)[idx] <- "Guatamala" # sic!
5362
}
5463
\keyword{datasets}

0 commit comments

Comments
 (0)