sciruby 0.1.0 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. data/.autotest +23 -0
  2. data/.gemtest +0 -0
  3. data/History.txt +6 -0
  4. data/Manifest.txt +119 -0
  5. data/Rakefile +178 -0
  6. data/bin/sciruby-plotter +12 -0
  7. data/data/r/man/AirPassengers.Rd +51 -0
  8. data/data/r/man/BJsales.Rd +34 -0
  9. data/data/r/man/BOD.Rd +53 -0
  10. data/data/r/man/ChickWeight.Rd +68 -0
  11. data/data/r/man/DNase.Rd +63 -0
  12. data/data/r/man/EuStockMarkets.Rd +28 -0
  13. data/data/r/man/Formaldehyde.Rd +44 -0
  14. data/data/r/man/HairEyeColor.Rd +77 -0
  15. data/data/r/man/Harman23.cor.Rd +25 -0
  16. data/data/r/man/Harman74.cor.Rd +28 -0
  17. data/data/r/man/Indometh.Rd +57 -0
  18. data/data/r/man/InsectSprays.Rd +45 -0
  19. data/data/r/man/JohnsonJohnson.Rd +37 -0
  20. data/data/r/man/LakeHuron.Rd +27 -0
  21. data/data/r/man/LifeCycleSavings.Rd +54 -0
  22. data/data/r/man/Loblolly.Rd +56 -0
  23. data/data/r/man/Nile.Rd +78 -0
  24. data/data/r/man/Orange.Rd +57 -0
  25. data/data/r/man/OrchardSprays.Rd +62 -0
  26. data/data/r/man/PlantGrowth.Rd +39 -0
  27. data/data/r/man/Puromycin.Rd +84 -0
  28. data/data/r/man/Theoph.Rd +84 -0
  29. data/data/r/man/Titanic.Rd +73 -0
  30. data/data/r/man/ToothGrowth.Rd +40 -0
  31. data/data/r/man/UCBAdmissions.Rd +68 -0
  32. data/data/r/man/UKDriverDeaths.Rd +72 -0
  33. data/data/r/man/UKLungDeaths.Rd +40 -0
  34. data/data/r/man/UKgas.Rd +25 -0
  35. data/data/r/man/USAccDeaths.Rd +23 -0
  36. data/data/r/man/USArrests.Rd +45 -0
  37. data/data/r/man/USJudgeRatings.Rd +38 -0
  38. data/data/r/man/USPersonalExpenditure.Rd +33 -0
  39. data/data/r/man/VADeaths.Rd +51 -0
  40. data/data/r/man/WWWusage.Rd +41 -0
  41. data/data/r/man/WorldPhones.Rd +40 -0
  42. data/data/r/man/ability.cov.Rd +50 -0
  43. data/data/r/man/airmiles.Rd +29 -0
  44. data/data/r/man/airquality.Rd +56 -0
  45. data/data/r/man/anscombe.Rd +62 -0
  46. data/data/r/man/attenu.Rd +66 -0
  47. data/data/r/man/attitude.Rd +48 -0
  48. data/data/r/man/austres.Rd +22 -0
  49. data/data/r/man/beavers.Rd +73 -0
  50. data/data/r/man/cars.Rd +59 -0
  51. data/data/r/man/chickwts.Rd +47 -0
  52. data/data/r/man/co2.Rd +43 -0
  53. data/data/r/man/crimtab.Rd +129 -0
  54. data/data/r/man/datasets-package.Rd +24 -0
  55. data/data/r/man/discoveries.Rd +30 -0
  56. data/data/r/man/esoph.Rd +66 -0
  57. data/data/r/man/euro.Rd +56 -0
  58. data/data/r/man/eurodist.Rd +25 -0
  59. data/data/r/man/faithful.Rd +63 -0
  60. data/data/r/man/freeny.Rd +56 -0
  61. data/data/r/man/infert.Rd +56 -0
  62. data/data/r/man/iris.Rd +62 -0
  63. data/data/r/man/islands.Rd +29 -0
  64. data/data/r/man/lh.Rd +22 -0
  65. data/data/r/man/longley.Rd +56 -0
  66. data/data/r/man/lynx.Rd +33 -0
  67. data/data/r/man/morley.Rd +50 -0
  68. data/data/r/man/mtcars.Rd +44 -0
  69. data/data/r/man/nhtemp.Rd +30 -0
  70. data/data/r/man/nottem.Rd +30 -0
  71. data/data/r/man/occupationalStatus.Rd +44 -0
  72. data/data/r/man/precip.Rd +31 -0
  73. data/data/r/man/presidents.Rd +36 -0
  74. data/data/r/man/pressure.Rd +41 -0
  75. data/data/r/man/quakes.Rd +40 -0
  76. data/data/r/man/randu.Rd +46 -0
  77. data/data/r/man/rivers.Rd +21 -0
  78. data/data/r/man/rock.Rd +34 -0
  79. data/data/r/man/sleep.Rd +51 -0
  80. data/data/r/man/stackloss.Rd +77 -0
  81. data/data/r/man/state.Rd +80 -0
  82. data/data/r/man/sunspot.month.Rd +49 -0
  83. data/data/r/man/sunspot.year.Rd +26 -0
  84. data/data/r/man/sunspots.Rd +33 -0
  85. data/data/r/man/swiss.Rd +79 -0
  86. data/data/r/man/treering.Rd +38 -0
  87. data/data/r/man/trees.Rd +48 -0
  88. data/data/r/man/uspop.Rd +27 -0
  89. data/data/r/man/volcano.Rd +31 -0
  90. data/data/r/man/warpbreaks.Rd +56 -0
  91. data/data/r/man/women.Rd +40 -0
  92. data/data/r/man/zCO2.Rd +81 -0
  93. data/lib/ext/csv.rb +22 -0
  94. data/lib/ext/shoes.rb +131 -0
  95. data/lib/ext/string.rb +39 -0
  96. data/lib/sciruby.rb +50 -4
  97. data/lib/sciruby/analysis.rb +98 -0
  98. data/lib/sciruby/analysis/suite.rb +87 -0
  99. data/lib/sciruby/analysis/suite_report_builder.rb +44 -0
  100. data/lib/sciruby/config.rb +93 -0
  101. data/lib/sciruby/data.rb +168 -0
  102. data/lib/sciruby/data/guardian.rb +96 -0
  103. data/lib/sciruby/data/r.rb +155 -0
  104. data/lib/sciruby/data/r/base.rb +110 -0
  105. data/lib/sciruby/data/r/data_frame.rb +24 -0
  106. data/lib/sciruby/data/r/grouped_data.rb +7 -0
  107. data/lib/sciruby/data/r/list.rb +20 -0
  108. data/lib/sciruby/data/r/multi_time_series.rb +24 -0
  109. data/lib/sciruby/data/r/r_matrix.rb +7 -0
  110. data/lib/sciruby/data/r/time_series.rb +19 -0
  111. data/lib/sciruby/data/r/time_series_base.rb +40 -0
  112. data/lib/sciruby/data/r/vector.rb +125 -0
  113. data/lib/sciruby/editor.rb +82 -0
  114. data/lib/sciruby/plotter.rb +128 -0
  115. data/lib/sciruby/recommend.rb +4 -0
  116. data/lib/sciruby/validation.rb +368 -0
  117. data/readme.md +75 -0
  118. data/static/sciruby-icon.png +0 -0
  119. data/test/helpers_tests.rb +58 -0
  120. data/test/test_recommend.rb +16 -0
  121. metadata +396 -20
@@ -0,0 +1,46 @@
1
+ % File src/library/datasets/man/randu.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{randu}
7
+ \docType{data}
8
+ \alias{randu}
9
+ \title{Random Numbers from Congruential Generator RANDU}
10
+ \description{
11
+ 400 triples of successive random numbers were taken from the VAX
12
+ FORTRAN function RANDU running under VMS 1.5.
13
+ }
14
+ \usage{randu}
15
+ \details{
16
+ In three dimensional displays it is evident that the triples fall on
17
+ 15 parallel planes in 3-space. This can be shown theoretically to be
18
+ true for all triples from the RANDU generator.
19
+
20
+ These particular 400 triples start 5 apart in the sequence, that is
21
+ they are ((U[5i+1], U[5i+2], U[5i+3]), i= 0, \dots, 399), and they
22
+ are rounded to 6 decimal places.
23
+
24
+ Under VMS versions 2.0 and higher, this problem has been fixed.
25
+ }
26
+ \format{
27
+ A data frame with 400 observations on 3 variables named \code{x},
28
+ \code{y} and \code{z} which give the first, second and third random
29
+ number in the triple.
30
+ }
31
+ \source{
32
+ David Donoho
33
+ }
34
+ \examples{
35
+ \dontrun{## We could re-generate the dataset by the following R code
36
+ seed <- as.double(1)
37
+ RANDU <- function() {
38
+ seed <<- ((2^16 + 3) * seed) \%\% (2^31)
39
+ seed/(2^31)
40
+ }
41
+ for(i in 1:400) {
42
+ U <- c(RANDU(), RANDU(), RANDU(), RANDU(), RANDU())
43
+ print(round(U[1:3], 6))
44
+ }}
45
+ }
46
+ \keyword{datasets}
@@ -0,0 +1,21 @@
1
+ % File src/library/datasets/man/rivers.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{rivers}
7
+ \docType{data}
8
+ \alias{rivers}
9
+ \title{Lengths of Major North American Rivers}
10
+ \description{
11
+ This data set gives the lengths (in miles) of 141 \dQuote{major}
12
+ rivers in North America, as compiled by the US Geological Survey.
13
+ }
14
+ \usage{rivers}
15
+ \format{A vector containing 141 observations.}
16
+ \source{World Almanac and Book of Facts, 1975, page 406.}
17
+ \references{
18
+ McNeil, D. R. (1977) \emph{Interactive Data Analysis}.
19
+ New York: Wiley.
20
+ }
21
+ \keyword{datasets}
@@ -0,0 +1,34 @@
1
+ % File src/library/datasets/man/rock.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1994-8 W. N. Venables and B. D. Ripley
4
+ % Distributed under GPL 2 or later
5
+
6
+ % Manually converted to Rd data file description format by KH.
7
+ \name{rock}
8
+ \docType{data}
9
+ \alias{rock}
10
+ \title{Measurements on Petroleum Rock Samples}
11
+ \description{
12
+ Measurements on 48 rock samples from a petroleum reservoir.}
13
+ \usage{rock}
14
+ \format{
15
+ A data frame with 48 rows and 4 numeric columns.
16
+
17
+ \tabular{rll}{
18
+ [,1] \tab area \tab area of pores space, in pixels
19
+ out of 256 by 256 \cr
20
+ [,2] \tab peri \tab perimeter in pixels \cr
21
+ [,3] \tab shape \tab perimeter/sqrt(area) \cr
22
+ [,4] \tab perm \tab permeability in milli-Darcies
23
+ }
24
+ }
25
+ \details{
26
+ Twelve core samples from petroleum reservoirs were sampled by 4
27
+ cross-sections. Each core sample was measured for permeability, and
28
+ each cross-section has total area of pores, total perimeter of
29
+ pores, and shape.
30
+ }
31
+ \source{
32
+ Data from BP Research, image analysis by Ronit Katz, U. Oxford.
33
+ }
34
+ \keyword{datasets}
@@ -0,0 +1,51 @@
1
+ % File src/library/datasets/man/sleep.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2010 R Core Development Team
4
+ % Copyright 1999-2010 The R Foundation
5
+ % Distributed under GPL 2 or later
6
+
7
+ \name{sleep}
8
+ \docType{data}
9
+ \encoding{UTF-8}
10
+ \alias{sleep}
11
+ \title{Student's Sleep Data}
12
+ \description{
13
+ Data which show the effect of two soporific drugs (increase in hours
14
+ of sleep compared to control) on 10 patients.
15
+ }
16
+ \usage{sleep}
17
+ \format{
18
+ A data frame with 20 observations on 3 variables.
19
+ \tabular{rlll}{
20
+ [, 1] \tab extra \tab numeric \tab increase in hours of sleep\cr
21
+ [, 2] \tab group \tab factor \tab drug given\cr
22
+ [, 3] \tab ID \tab factor \tab patient ID
23
+ }
24
+ }
25
+ \source{
26
+ Cushny, A. R. and Peebles, A. R. (1905)
27
+ The action of optical isomers: II hyoscines.
28
+ \emph{The Journal of Physiology} \bold{32}, 501--510.
29
+
30
+ Student (1908)
31
+ The probable error of the mean.
32
+ \emph{Biometrika}, \bold{6}, 20.
33
+ }
34
+ \details{
35
+ The \code{group} variable name may be misleading about the data:
36
+ They represent measurements on 10 persons, not in groups.
37
+ %% But we keep it (as [,2]) for back compatibility.
38
+ }
39
+ \references{
40
+ \enc{Scheffé}{Scheffe}, Henry (1959)
41
+ \emph{The Analysis of Variance}.
42
+ New York, NY: Wiley.
43
+ }
44
+ \examples{
45
+ require(stats)
46
+ ## Student's paired t-test
47
+ with(sleep,
48
+ t.test(extra[group == 1],
49
+ extra[group == 2], paired = TRUE))
50
+ }
51
+ \keyword{datasets}
@@ -0,0 +1,77 @@
1
+ % File src/library/datasets/man/stackloss.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{stackloss}
7
+ \docType{data}
8
+ \alias{stackloss}
9
+ \alias{stack.loss}
10
+ \alias{stack.x}
11
+ \title{Brownlee's Stack Loss Plant Data}
12
+ \description{
13
+ Operational data of a plant for the oxidation of ammonia to nitric
14
+ acid.
15
+ }
16
+ \usage{
17
+ stackloss
18
+
19
+ stack.x
20
+ stack.loss
21
+ }
22
+ \format{
23
+ \code{stackloss} is a data frame with 21 observations on 4 variables.
24
+
25
+ \tabular{rll}{
26
+ [,1] \tab \code{Air Flow} \tab Flow of cooling air\cr
27
+ [,2] \tab \code{Water Temp} \tab Cooling Water Inlet
28
+ Temperature\cr
29
+ [,3] \tab \code{Acid Conc.} \tab Concentration of acid [per
30
+ 1000, minus 500]\cr
31
+ [,4] \tab \code{stack.loss} \tab Stack loss\cr
32
+ }
33
+
34
+ For compatibility with S-PLUS, the data sets \code{stack.x}, a matrix
35
+ with the first three (independent) variables of the data frame, and
36
+ \code{stack.loss}, the numeric vector giving the fourth (dependent)
37
+ variable, are provided as well.
38
+ }
39
+ \source{
40
+ Brownlee, K. A. (1960, 2nd ed. 1965)
41
+ \emph{Statistical Theory and Methodology in Science and Engineering}.
42
+ New York: Wiley. pp. 491--500.
43
+ }
44
+ \details{
45
+ \dQuote{Obtained from 21 days of operation of a plant for the
46
+ oxidation of ammonia (NH\eqn{_3}{3}) to nitric acid
47
+ (HNO\eqn{_3}{3}). The nitric oxides produced are absorbed in a
48
+ countercurrent absorption tower}.
49
+ (Brownlee, cited by Dodge, slightly reformatted by MM.)
50
+
51
+ \code{Air Flow} represents the rate of operation of the plant.
52
+ \code{Water Temp} is the temperature of cooling water circulated
53
+ through coils in the absorption tower.
54
+ \code{Acid Conc.} is the concentration of the acid circulating, minus
55
+ 50, times 10: that is, 89 corresponds to 58.9 per cent acid.
56
+ \code{stack.loss} (the dependent variable) is 10 times the percentage
57
+ of the ingoing ammonia to the plant that escapes from the absorption
58
+ column unabsorbed; that is, an (inverse) measure of the over-all
59
+ efficiency of the plant.
60
+ }
61
+ \references{
62
+ Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
63
+ \emph{The New S Language}.
64
+ Wadsworth & Brooks/Cole.
65
+
66
+ Dodge, Y. (1996)
67
+ The guinea pig of multiple regression. In:
68
+ \emph{Robust Statistics, Data Analysis, and Computer Intensive
69
+ Methods; In Honor of Peter Huber's 60th Birthday}, 1996,
70
+ \emph{Lecture Notes in Statistics} \bold{109}, Springer-Verlag, New York.
71
+ }
72
+ \examples{
73
+ require(stats)
74
+ summary(lm.stack <- lm(stack.loss ~ stack.x))
75
+ }
76
+ \keyword{datasets}
77
+
@@ -0,0 +1,80 @@
1
+ % File src/library/datasets/man/state.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{state}
7
+ \docType{data}
8
+ \alias{state}
9
+ \alias{state.abb}
10
+ \alias{state.area}
11
+ \alias{state.center}
12
+ \alias{state.division}
13
+ \alias{state.name}
14
+ \alias{state.region}
15
+ \alias{state.x77}
16
+ \title{US State Facts and Figures}
17
+ \description{Data sets related to the 50 states of the United States of
18
+ America.}
19
+ \usage{
20
+ state.abb
21
+ state.area
22
+ state.center
23
+ state.division
24
+ state.name
25
+ state.region
26
+ state.x77
27
+ }
28
+ \details{
29
+ \R currently contains the following \dQuote{state} data sets. Note
30
+ that all data are arranged according to alphabetical order of the
31
+ state names.
32
+ \describe{
33
+ \item{\code{state.abb}:}{character vector of 2-letter abbreviations
34
+ for the state names.}
35
+ \item{\code{state.area}:}{numeric vector of state areas (in square
36
+ miles).}
37
+ \item{\code{state.center}:}{ list with components named \code{x} and
38
+ \code{y} giving the approximate geographic center of each state in
39
+ negative longitude and latitude. Alaska and Hawaii are placed
40
+ just off the West Coast.}
41
+ \item{\code{state.division}:}{factor giving state divisions (New
42
+ England, Middle Atlantic, South Atlantic, East South Central, West
43
+ South Central, East North Central, West North Central, Mountain,
44
+ and Pacific).}
45
+ \item{\code{state.name}:}{character vector giving the full state
46
+ names.}
47
+ \item{\code{state.region}:}{factor giving the region (Northeast,
48
+ South, North Central, West) that each state belongs to.}
49
+ \item{\code{state.x77}:}{matrix with 50 rows and 8 columns giving
50
+ the following statistics in the respective columns.
51
+ \describe{
52
+ \item{\code{Population}:}{population estimate as of July 1,
53
+ 1975}
54
+ \item{\code{Income}:}{per capita income (1974)}
55
+ \item{\code{Illiteracy}:}{illiteracy (1970, percent of
56
+ population)}
57
+ \item{\code{Life Exp}:}{life expectancy in years (1969--71)}
58
+ \item{\code{Murder}:}{murder and non-negligent manslaughter rate
59
+ per 100,000 population (1976)}
60
+ \item{\code{HS Grad}:}{percent high-school graduates (1970)}
61
+ \item{\code{Frost}:}{mean number of days with minimum
62
+ temperature below freezing (1931--1960) in capital or large
63
+ city}
64
+ \item{\code{Area}:}{land area in square miles}
65
+ }}
66
+ }
67
+ }
68
+ \source{
69
+ U.S. Department of Commerce, Bureau of the Census (1977)
70
+ \emph{Statistical Abstract of the United States}.
71
+
72
+ U.S. Department of Commerce, Bureau of the Census (1977)
73
+ \emph{County and City Data Book}.
74
+ }
75
+ \references{
76
+ Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
77
+ \emph{The New S Language}.
78
+ Wadsworth & Brooks/Cole.
79
+ }
80
+ \keyword{datasets}
@@ -0,0 +1,49 @@
1
+ % File src/library/datasets/man/sunspot.month.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{sunspot.month}
7
+ \docType{data}
8
+ \alias{sunspot.month}
9
+ \title{
10
+ Monthly Sunspot Data, 1749--1997
11
+ }
12
+ \description{
13
+ Monthly numbers of sunspots.
14
+ }
15
+ \usage{
16
+ sunspot.month
17
+ }
18
+ \format{
19
+ The univariate time series \code{sunspot.year} and
20
+ \code{sunspot.month} contain 289 and 2988 observations, respectively.
21
+ The objects are of class \code{"ts"}.
22
+ }
23
+ \seealso{
24
+ \code{sunspot.month} is a longer version of \code{\link{sunspots}}
25
+ that runs until 1988 rather than 1983.
26
+ }
27
+ \source{
28
+ World Data Center-C1 For Sunspot Index
29
+ Royal Observatory of Belgium, Av. Circulaire, 3, B-1180 BRUSSELS
30
+ \url{http://www.oma.be/KSB-ORB/SIDC/sidc_txt.html}
31
+ }
32
+ \examples{
33
+ require(stats); require(graphics)
34
+ ## Compare the monthly series
35
+ plot (sunspot.month, main = "sunspot.month [stats]", col = 2)
36
+ lines(sunspots) # "very barely" see something
37
+
38
+ ## Now look at the difference :
39
+ all(tsp(sunspots) [c(1,3)] ==
40
+ tsp(sunspot.month)[c(1,3)]) ## Start & Periodicity are the same
41
+ n1 <- length(sunspots)
42
+ table(eq <- sunspots == sunspot.month[1:n1]) #> 132 are different !
43
+ i <- which(!eq)
44
+ rug(time(eq)[i])
45
+ s1 <- sunspots[i] ; s2 <- sunspot.month[i]
46
+ cbind(i = i, sunspots = s1, ss.month = s2,
47
+ perc.diff = round(100*2*abs(s1-s2)/(s1+s2), 1))
48
+ }
49
+ \keyword{datasets}
@@ -0,0 +1,26 @@
1
+ % File src/library/datasets/man/sunspot.year.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{sunspot.year}
7
+ \docType{data}
8
+ \alias{sunspot.year}
9
+ \title{
10
+ Yearly Sunspot Data, 1700--1988
11
+ }
12
+ \description{
13
+ Yearly numbers of sunspots.
14
+ }
15
+ \usage{
16
+ sunspot.year
17
+ }
18
+ \format{
19
+ The univariate time series \code{sunspot.year} contains 289
20
+ observations, and is of class \code{"ts"}.
21
+ }
22
+ \source{
23
+ H. Tong (1996)
24
+ \emph{Non-Linear Time Series}. Clarendon Press, Oxford, p. 471.
25
+ }
26
+ \keyword{datasets}
@@ -0,0 +1,33 @@
1
+ % File src/library/datasets/man/sunspots.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{sunspots}
7
+ \docType{data}
8
+ \alias{sunspots}
9
+ \title{Monthly Sunspot Numbers, 1749--1983}
10
+ \description{
11
+ Monthly mean relative sunspot numbers from 1749 to 1983. Collected at
12
+ Swiss Federal Observatory, Zurich until 1960, then Tokyo Astronomical
13
+ Observatory.
14
+ }
15
+ \usage{sunspots}
16
+ \format{
17
+ A time series of monthly data from 1749 to 1983.
18
+ }
19
+ \source{
20
+ Andrews, D. F. and Herzberg, A. M. (1985)
21
+ \emph{Data: A Collection of Problems from Many Fields for the
22
+ Student and Research Worker}.
23
+ New York: Springer-Verlag.
24
+ }
25
+ \seealso{
26
+ \code{\link{sunspot.month}} has a longer (and a bit different) series.
27
+ }
28
+ \examples{
29
+ require(graphics)
30
+ plot(sunspots, main = "sunspots data", xlab = "Year",
31
+ ylab = "Monthly sunspot numbers")
32
+ }
33
+ \keyword{datasets}
@@ -0,0 +1,79 @@
1
+ % File src/library/datasets/man/swiss.Rd
2
+ % Part of the R package, http://www.R-project.org
3
+ % Copyright 1995-2007 R Core Development Team
4
+ % Distributed under GPL 2 or later
5
+
6
+ \name{swiss}
7
+ \docType{data}
8
+ \alias{swiss}
9
+ \title{Swiss Fertility and Socioeconomic Indicators (1888) Data}
10
+ \description{
11
+ Standardized fertility measure and socio-economic indicators for each
12
+ of 47 French-speaking provinces of Switzerland at about 1888.
13
+ }
14
+ \usage{swiss}
15
+ \format{
16
+ A data frame with 47 observations on 6 variables, \emph{each} of which
17
+ is in percent, i.e., in \eqn{[0, 100]}.
18
+
19
+ \tabular{rll}{
20
+ [,1] \tab Fertility \tab \eqn{I_g}{Ig}, \sQuote{common standardized
21
+ fertility measure}\cr
22
+ [,2] \tab Agriculture\tab \% of males involved in agriculture
23
+ as occupation\cr
24
+ [,3] \tab Examination\tab \% draftees receiving highest mark
25
+ on army examination\cr
26
+ [,4] \tab Education \tab \% education beyond primary school for draftees.\cr
27
+ [,5] \tab Catholic \tab \% \sQuote{catholic} (as opposed to \sQuote{protestant}).\cr
28
+ [,6] \tab Infant.Mortality\tab live births who live less than 1
29
+ year.
30
+ }
31
+
32
+ All variables but \sQuote{Fertility} give proportions of the
33
+ population.
34
+ }
35
+ \details{
36
+ (paraphrasing Mosteller and Tukey):
37
+
38
+ Switzerland, in 1888, was entering a period known as the
39
+ \emph{demographic transition}; i.e., its fertility was beginning to
40
+ fall from the high level typical of underdeveloped countries.
41
+
42
+ The data collected are for 47 French-speaking \dQuote{provinces} at
43
+ about 1888.
44
+
45
+ Here, all variables are scaled to \eqn{[0, 100]}, where in the
46
+ original, all but \code{"Catholic"} were scaled to \eqn{[0, 1]}.
47
+ }
48
+ \source{
49
+ Project \dQuote{16P5}, pages 549--551 in
50
+
51
+ Mosteller, F. and Tukey, J. W. (1977)
52
+ \emph{Data Analysis and Regression: A Second Course in Statistics}.
53
+ Addison-Wesley, Reading Mass.
54
+
55
+ indicating their source as
56
+ \dQuote{Data used by permission of Franice van de Walle. Office of
57
+ Population Research, Princeton University, 1976. Unpublished data
58
+ assembled under NICHD contract number No 1-HD-O-2077.}
59
+ }
60
+ \references{
61
+ Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988)
62
+ \emph{The New S Language}.
63
+ Wadsworth & Brooks/Cole.
64
+ }
65
+ \note{
66
+ Files for all 182 districts in 1888 and other years have been available at
67
+ \url{http://opr.princeton.edu/archive/eufert/switz.html} or
68
+ \url{http://opr.princeton.edu/archive/pefp/switz.asp}.
69
+
70
+ They state that variables \code{Examination} and \code{Education}
71
+ are averages for 1887, 1888 and 1889.
72
+ }
73
+ \examples{
74
+ require(stats); require(graphics)
75
+ pairs(swiss, panel = panel.smooth, main = "swiss data",
76
+ col = 3 + (swiss$Catholic > 50))
77
+ summary(lm(Fertility ~ . , data = swiss))
78
+ }
79
+ \keyword{datasets}