\Header{sunspot}{Yearly Sunspot Data, 1700--1988, and
Monthly Sunspot Data, 1749--1997}
\methalias{sunspot.month}{sunspot}
\methalias{sunspot.year}{sunspot}
\keyword{datasets}{sunspot}
\begin{Description}\relax
Monthly and yearly number of sunspots.\end{Description}
\begin{Usage}
\begin{verbatim}
data(sunspot)
\end{verbatim}
\end{Usage}
\begin{Format}\relax
The univariate time series \code{sunspot.year} and
\code{sunspot.month} contain 289 and 2988 observations, respectively.
The objects are of class \code{"ts"}.\end{Format}
\begin{Source}\relax
Monthly data: Sunspot Index Data Center,
World Data Center-C1 For Sunspot Index
Royal Observatory of Belgium, Av. Circulaire, 3, B-1180 BRUSSELS
\url{http://www.oma.be/KSB-ORB/SIDC/sidc_txt.html}

Yearly data: H. Tong (1996)
\emph{Non-Linear Time Series}. Clarendon Press, Oxford, p. 471.\end{Source}
\begin{References}\relax
Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
\emph{The New S Language}.
Wadsworth \& Brooks/Cole.\end{References}
\begin{SeeAlso}\relax
\code{sunspot.month} is a longer version of \code{\Link{sunspots}}
in base \R, that runs until 1988.\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Compare the monthly series from 'base' and 'ts':
data(sunspots, package = base)
data(sunspot,  package = ts)
plot (sunspot.month, main = "sunspot.month [ts]", col = 2)
lines(sunspots) # "very barely" see something

## Now look at the difference :
all(tsp(sunspots)     [c(1,3)] ==
    tsp(sunspot.month)[c(1,3)]) ## Start & Periodicity are the same
n1 <- length(sunspots)
table(eq <- sunspots == sunspot.month[1:n1]) #>  132  are different !
i <- which(!eq) 
rug(time(eq)[i])
s1 <- sunspots[i] ; s2 <- sunspot.month[i]
cbind(i = i, sunspots = s1, ss.month = s2,
      perc.diff = round(100*2*abs(s1-s2)/(s1+s2), 1))
\end{ExampleCode}
\end{Examples}

