datasets: The R Datasets Package
Rデータセットパッケージ
> library(datasets)
バージョン: 3.2.3
関数名 | 概略 |
---|---|
AirPassengers |
Monthly Airline Passenger Numbers 1949-1960 |
BJsales |
Sales Data with Leading Indicator |
BOD |
Biochemical Oxygen Demand |
CO2 |
Carbon Dioxide Uptake in Grass Plants |
ChickWeight |
Weight versus age of chicks on different diets |
DNase |
Elisa assay of DNase |
EuStockMarkets |
Daily Closing Prices of Major European Stock Indices, 1991-1998 |
Formaldehyde |
Determination of Formaldehyde |
HairEyeColor |
Hair and Eye Color of Statistics Students |
Harman23.cor |
Harman Example 2.3 |
Harman74.cor |
Harman Example 7.4 |
Indometh |
Pharmacokinetics of Indomethacin |
InsectSprays |
Effectiveness of Insect Sprays |
JohnsonJohnson |
Quarterly Earnings per Johnson & Johnson Share |
LakeHuron |
Level of Lake Huron 1875-1972 |
LifeCycleSavings |
Intercountry Life-Cycle Savings Data |
Loblolly |
Growth of Loblolly pine trees |
Nile |
Flow of the River Nile |
Orange |
Growth of Orange Trees |
OrchardSprays |
Potency of Orchard Sprays |
PlantGrowth |
Results from an Experiment on Plant Growth |
Puromycin |
Reaction Velocity of an Enzymatic Reaction |
Theoph |
Pharmacokinetics of Theophylline |
Titanic |
Survival of passengers on the Titanic |
ToothGrowth |
The Effect of Vitamin C on Tooth Growth in Guinea Pigs |
UCBAdmissions |
Student Admissions at UC Berkeley |
UKDriverDeaths |
Road Casualties in Great Britain 1969-84 |
UKLungDeaths |
Monthly Deaths from Lung Diseases in the UK |
UKgas |
UK Quarterly Gas Consumption |
USAccDeaths |
Accidental Deaths in the US 1973-1978 |
USArrests |
Violent Crime Rates by US State |
USJudgeRatings |
Lawyers' Ratings of State Judges in the US Superior Court |
USPersonalExpenditure |
Personal Expenditure Data |
VADeaths |
Death Rates in Virginia (1940) |
WWWusage |
Internet Usage per Minute |
WorldPhones |
The World's Telephones |
ability.cov |
Ability and Intelligence Tests |
airmiles |
Passenger Miles on Commercial US Airlines, 1937-1960 |
airquality |
New York Air Quality Measurements |
anscombe |
Anscombe's Quartet of 'Identical' Simple Linear Regressions |
attenu |
The Joyner-Boore Attenuation Data |
attitude |
The Chatterjee-Price Attitude Data |
austres |
Quarterly Time Series of the Number of Australian Residents |
beavers |
Body Temperature Series of Two Beavers |
cars |
Speed and Stopping Distances of Cars |
chickwts |
Chicken Weights by Feed Type |
co2 |
Mauna Loa Atmospheric CO2 Concentration |
crimtab |
Student's 3000 Criminals Data |
datasets-package |
The R Datasets Package |
discoveries |
Yearly Numbers of Important Discoveries |
esoph |
Smoking, Alcohol and (O)esophageal Cancer |
euro |
Conversion Rates of Euro Currencies |
eurodist |
Distances Between European Cities and Between US Cities |
faithful |
Old Faithful Geyser Data |
freeny |
Freeny's Revenue Data |
infert |
Infertility after Spontaneous and Induced Abortion |
iris |
Edgar Anderson's Iris Data |
islands |
Areas of the World's Major Landmasses |
lh |
Luteinizing Hormone in Blood Samples |
longley |
Longley's Economic Regression Data |
lynx |
Annual Canadian Lynx trappings 1821-1934 |
morley |
Michelson Speed of Light Data |
mtcars |
Motor Trend Car Road Tests |
nhtemp |
Average Yearly Temperatures in New Haven |
nottem |
Average Monthly Temperatures at Nottingham, 1920-1939 |
npk |
Classical N, P, K Factorial Experiment |
occupationalStatus |
Occupational Status of Fathers and their Sons |
precip |
Annual Precipitation in US Cities |
presidents |
Quarterly Approval Ratings of US Presidents |
pressure |
Vapor Pressure of Mercury as a Function of Temperature |
quakes |
Locations of Earthquakes off Fiji |
randu |
Random Numbers from Congruential Generator RANDU |
rivers |
Lengths of Major North American Rivers |
rock |
Measurements on Petroleum Rock Samples |
sleep |
Student's Sleep Data |
stackloss |
Brownlee's Stack Loss Plant Data |
state |
US State Facts and Figures |
sunspot.month |
Monthly Sunspot Data, from 1749 to "Present" |
sunspot.year |
Yearly Sunspot Data, 1700-1988 |
sunspots |
Monthly Sunspot Numbers, 1749-1983 |
swiss |
Swiss Fertility and Socioeconomic Indicators (1888) Data |
treering |
Yearly Treering Data, -6000-1979 |
trees |
Girth, Height and Volume for Black Cherry Trees |
uspop |
Populations Recorded by the US Census |
volcano |
Topographic Information on Auckland's Maunga Whau Volcano |
warpbreaks |
The Number of Breaks in Yarn during Weaving |
women |
Average Heights and Weights for American Women |
AirPassengers
1949年から1960年にかけての月間飛行機旅客
> AirPassengers %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:144] from 1949 to 1961: 112 118 132 129 121 135 148 148 136 119 ...
BJsales
主要経済の売上データ
> BJsales %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:150] from 1 to 150: 200 200 199 199 199 ...
BOD
> BOD %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "data.frame"
Observations: 6
Variables: 2
$ Time (dbl) 1, 2, 3, 4, 5, 7
$ demand (dbl) 8.3, 10.3, 19.0, 16.0, 15.6, 19.8
CO2
> CO2 %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "nfnGroupedData" "nfGroupedData" "groupedData" "data.frame"
Observations: 84
Variables: 5
$ Plant (fctr) Qn1, Qn1, Qn1, Qn1, Qn1, Qn1, Qn1, Qn2, Qn2, Qn2, Q...
$ Type (fctr) Quebec, Quebec, Quebec, Quebec, Quebec, Quebec, Que...
$ Treatment (fctr) nonchilled, nonchilled, nonchilled, nonchilled, non...
$ conc (dbl) 95, 175, 250, 350, 500, 675, 1000, 95, 175, 250, 350...
$ uptake (dbl) 16.0, 30.4, 34.8, 37.2, 35.3, 39.2, 39.7, 13.6, 27.3...
ChickWeight
> ChickWeight %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "nfnGroupedData" "nfGroupedData" "groupedData" "data.frame"
Observations: 578
Variables: 4
$ weight (dbl) 42, 51, 59, 64, 76, 93, 106, 125, 149, 171, 199, 205, 4...
$ Time (dbl) 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 21, 0, 2, 4, 6, ...
$ Chick (fctr) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, ...
$ Diet (fctr) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
DNase
> DNase %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "nfnGroupedData" "nfGroupedData" "groupedData" "data.frame"
Observations: 176
Variables: 3
$ Run (fctr) 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2,...
$ conc (dbl) 0.04882812, 0.04882812, 0.19531250, 0.19531250, 0.3906...
$ density (dbl) 0.017, 0.018, 0.121, 0.124, 0.206, 0.215, 0.377, 0.374...
EuStockMarkets
> EuStockMarkets %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "mts" "ts" "matrix"
mts [1:1860, 1:4] 1629 1614 1607 1621 1618 ...
- attr(*, "dimnames")=List of 2
..$ : NULL
..$ : chr [1:4] "DAX" "SMI" "CAC" "FTSE"
- attr(*, "tsp")= num [1:3] 1991 1999 260
- attr(*, "class")= chr [1:3] "mts" "ts" "matrix"
Formaldehyde
> Formaldehyde %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "data.frame"
Observations: 6
Variables: 2
$ carb (dbl) 0.1, 0.3, 0.5, 0.6, 0.7, 0.9
$ optden (dbl) 0.086, 0.269, 0.446, 0.538, 0.626, 0.782
HairEyeColor
> HairEyeColor %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "table"
table [1:4, 1:4, 1:2] 32 53 10 3 11 50 10 30 10 25 ...
- attr(*, "dimnames")=List of 3
..$ Hair: chr [1:4] "Black" "Brown" "Red" "Blond"
..$ Eye : chr [1:4] "Brown" "Blue" "Hazel" "Green"
..$ Sex : chr [1:2] "Male" "Female"
Harman23.cor
> Harman23.cor %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "list"
List of 3
$ cov : num [1:8, 1:8] 1 0.846 0.805 0.859 0.473 0.398 0.301 0.382 0.846 1 ...
..- attr(*, "dimnames")=List of 2
.. ..$ : chr [1:8] "height" "arm.span" "forearm" "lower.leg" ...
.. ..$ : chr [1:8] "height" "arm.span" "forearm" "lower.leg" ...
$ center: num [1:8] 0 0 0 0 0 0 0 0
$ n.obs : num 305
LakeHuron
1875年から1972年のHuron湖の年間水位
> LakeHuron %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:98] from 1875 to 1972: 580 582 581 581 580 ...
Nile
ナイル川の水量
> Nile %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:100] from 1871 to 1970: 1120 1160 963 1210 1160 1160 813 1230 1370 1140 ...
Orange
> Orange %>% {
+ class(.) %>% print()
+ dplyr::tbl_df(.)
+ }
[1] "nfnGroupedData" "nfGroupedData" "groupedData" "data.frame"
Source: local data frame [35 x 3]
Tree age circumference
(fctr) (dbl) (dbl)
1 1 118 30
2 1 484 58
3 1 664 87
4 1 1004 115
5 1 1231 120
6 1 1372 142
7 1 1582 145
8 2 118 33
9 2 484 69
10 2 664 111
.. ... ... ...
PlantGrowth
> PlantGrowth %>% {
+ class(.) %>% print()
+ dplyr::tbl_df(.)
+ }
[1] "data.frame"
Source: local data frame [30 x 2]
weight group
(dbl) (fctr)
1 4.17 ctrl
2 5.58 ctrl
3 5.18 ctrl
4 6.11 ctrl
5 4.50 ctrl
6 4.61 ctrl
7 5.17 ctrl
8 4.53 ctrl
9 5.33 ctrl
10 5.14 ctrl
.. ... ...
UKDriverDeaths
> UKDriverDeaths %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:192] from 1969 to 1985: 1687 1508 1507 1385 1632 ...
WWWusage
インターネット利用者
> WWWusage %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:100] from 1 to 100: 88 84 85 85 84 85 83 85 88 89 ...
airquality
> airquality %>% {
+ print(class(.))
+ dplyr::tbl_df(.)
+ }
[1] "data.frame"
Source: local data frame [153 x 6]
Ozone Solar.R Wind Temp Month Day
(int) (int) (dbl) (int) (int) (int)
1 41 190 7.4 67 5 1
2 36 118 8.0 72 5 2
3 12 149 12.6 74 5 3
4 18 313 11.5 62 5 4
5 NA NA 14.3 56 5 5
6 28 NA 14.9 66 5 6
7 23 299 8.6 65 5 7
8 19 99 13.8 59 5 8
9 8 19 20.1 61 5 9
10 NA 194 8.6 69 5 10
.. ... ... ... ... ... ...
austres
> austres %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:89] from 1971 to 1993: 13067 13130 13198 13254 13304 ...
lh
> lh %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:48] from 1 to 48: 2.4 2.4 2.4 2.2 2.1 1.5 2.3 2.3 2.5 2 ...
Loblolly
> Loblolly %>% {
+ print(class(.))
+ dplyr::tbl_df(.)
+ }
[1] "nfnGroupedData" "nfGroupedData" "groupedData" "data.frame"
Source: local data frame [84 x 3]
height age Seed
(dbl) (dbl) (fctr)
1 4.51 3 301
2 10.89 5 301
3 28.72 10 301
4 41.74 15 301
5 52.70 20 301
6 60.92 25 301
7 4.55 3 303
8 10.92 5 303
9 29.07 10 303
10 42.83 15 303
.. ... ... ...
lynx
> lynx %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:114] from 1821 to 1934: 269 321 585 871 1475 ...
nhtemp
> nhtemp %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:60] from 1912 to 1971: 49.9 52.3 49.4 51.1 49.4 47.9 49.8 50.9 49.3 51.9 ...
nottem
> nottem %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:240] from 1920 to 1940: 40.6 40.8 44.4 46.7 54.1 58.5 57.7 56.4 54.3 50.5 ...
presidents
アメリカ合衆国大統領の3ヶ月おきの支持率
> presidents %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:120] from 1945 to 1975: NA 87 82 75 63 50 43 32 35 60 ...
sunspot.month
> sunspot.month %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:3177] from 1749 to 2014: 58 62.6 70 55.7 85 83.5 94.8 66.3 75.9 75.5 ...
sunspot.year
> sunspot.year %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:289] from 1700 to 1988: 5 11 16 23 36 58 29 20 10 8 ...
sunspots
> sunspots %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:2820] from 1749 to 1984: 58 62.6 70 55.7 85 83.5 94.8 66.3 75.9 75.5 ...
treering
> treering %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:7980] from -6000 to 1979: 1.34 1.08 1.54 1.32 1.41 ...
UKgas
> UKgas %>% {
+ class(.) %>% print()
+ str(.)
+ }
[1] "ts"
Time-Series [1:108] from 1960 to 1987: 160.1 129.7 84.8 120.1 160.1 ...
warpbreaks
> warpbreaks %>% {
+ class(.) %>% print()
+ dplyr::glimpse(.)
+ }
[1] "data.frame"
Observations: 54
Variables: 3
$ breaks (dbl) 26, 30, 54, 25, 70, 52, 51, 26, 67, 18, 21, 29, 17, 12...
$ wool (fctr) A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A, A,...
$ tension (fctr) L, L, L, L, L, L, L, L, L, M, M, M, M, M, M, M, M, M,...