EVOLUTION-MANAGER
Edit File: sunspot.year.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Yearly Sunspot Data, 1700-1988</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for sunspot.year {datasets}"><tr><td>sunspot.year {datasets}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Yearly Sunspot Data, 1700–1988</h2> <h3>Description</h3> <p>Yearly numbers of sunspots from 1700 to 1988 (rounded to one digit). </p> <p>Note that monthly numbers are available as <code><a href="sunspot.month.html">sunspot.month</a></code>, though starting slightly later. </p> <h3>Usage</h3> <pre> sunspot.year </pre> <h3>Format</h3> <p>The univariate time series <code>sunspot.year</code> contains 289 observations, and is of class <code>"ts"</code>. </p> <h3>Source</h3> <p>H. Tong (1996) <em>Non-Linear Time Series</em>. Clarendon Press, Oxford, p. 471. </p> <h3>See Also</h3> <p>For <em>monthly</em> sunspot numbers, see <code><a href="sunspot.month.html">sunspot.month</a></code> and <code><a href="sunspots.html">sunspots</a></code>. </p> <p>Regularly updated yearly sunspot numbers are available from WDC-SILSO, Royal Observatory of Belgium, at <a href="http://www.sidc.be/silso/datafiles">http://www.sidc.be/silso/datafiles</a> </p> <h3>Examples</h3> <pre> utils::str(sm <- sunspots)# the monthly version we keep unchanged utils::str(sy <- sunspot.year) ## The common time interval (t1 <- c(max(start(sm), start(sy)), 1)) # Jan 1749 (t2 <- c(min( end(sm)[1],end(sy)[1]), 12)) # Dec 1983 s.m <- window(sm, start=t1, end=t2) s.y <- window(sy, start=t1, end=t2[1]) # {irrelevant warning} stopifnot(length(s.y) * 12 == length(s.m), ## The yearly series *is* close to the averages of the monthly one: all.equal(s.y, aggregate(s.m, FUN = mean), tol = 0.0020)) ## NOTE: Strangely, correctly weighting the number of days per month ## (using 28.25 for February) is *not* closer than the simple mean: ndays <- c(31, 28.25, rep(c(31,30, 31,30, 31), 2)) all.equal(s.y, aggregate(s.m, FUN = mean)) # 0.0013 all.equal(s.y, aggregate(s.m, FUN = weighted.mean, w = ndays)) # 0.0017 </pre> <hr /><div style="text-align: center;">[Package <em>datasets</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>