sunspot                  package:ts                  R Documentation

_Y_e_a_r_l_y _S_u_n_s_p_o_t _D_a_t_a, _1_7_0_0-_1_9_8_8.
_M_o_n_t_h_l_y _S_u_n_s_p_o_t _D_a_t_a, _1_7_4_9-_1_9_9_7.

_D_e_s_c_r_i_p_t_i_o_n:

     Monthly and yearly number of sunspots.

_U_s_a_g_e:

     data(sunspot)

_F_o_r_m_a_t:

     The univariate time series `sunspot.year' and `sunspot.month'
     contain 289 and 2988 observations, respectively. The objects are
     of class `"ts"'.

_S_o_u_r_c_e:

     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) Non-Linear Time Series. Clarendon
     Press, Oxford, p. 471.

_S_e_e _A_l_s_o:

     `sunspot.month' is a longer version of `sunspots' in base R, that
     runs until 1988.

_E_x_a_m_p_l_e_s:

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

