R Datasets
R datasets provides a couple of free datasets as part of the ‘Statistical Computing with R’ tool. This page provides a list of available datasets and in which libraries or packages they can be found.
R Datasets Package
The ‘datasets’ package is load by default when starting R and provides free data. In order to list an overview of available data, please use the following R command:
>data()
Output:
Data sets in package ‘datasets’:
AirPassengers (Monthly Airline Passenger Numbers 1949-1960)
BJsales (Sales Data with Leading Indicator)
BJsales.lead (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)
Seatbelts (Road Casualties in Great Britain 1969-84)
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)
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)
beaver1 (beavers) (Body Temperature Series of Two Beavers)
beaver2 (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)
discoveries (Yearly Numbers of Important Discoveries)
esoph (Smoking, Alcohol and (O)esophageal Cancer)
euro (Conversion Rates of Euro Currencies)
euro.cross (euro) (Conversion Rates of Euro Currencies)
eurodist (Distances Between European Cities)
faithful (Old Faithful Geyser Data)
fdeaths (UKLungDeaths) (Monthly Deaths from Lung Diseases in the UK)
freeny (Freeny's Revenue Data)
freeny.x (freeny) (Freeny's Revenue Data)
freeny.y (freeny) (Freeny's Revenue Data)
infert (Infertility after Spontaneous and Induced Abortion)
Iris (Edgar Anderson's Iris Data)
iris3 (Edgar Anderson's Iris Data)
Islands (Areas of the World's Major Landmasses)
ldeaths (UKLungDeaths) (Monthly Deaths from Lung Diseases in the UK)
lh (Luteinizing Hormone in Blood Samples)
longley (Longley's Economic Regression Data)
lynx (Annual Canadian Lynx trappings 1821-1934)
mdeaths (UKLungDeaths) (Monthly Deaths from Lung Diseases in the UK)
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)
stack.loss (stackloss) (Brownlee's Stack Loss Plant Data)
stack.x (stackloss) (Brownlee's Stack Loss Plant Data)
stackloss (Brownlee's Stack Loss Plant Data)
state.abb (state) (US State Facts and Figures)
state.area (state) (US State Facts and Figures)
state.center (state) (US State Facts and Figures)
state.division (state) (US State Facts and Figures)
state.name (state) (US State Facts and Figures)
state.region (state) (US State Facts and Figures)
state.x77 (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)
R MASS Library
The ‘MASS library’ contains a number of free datasets. In order to load this library and to list an overview of available data alongside the other datasets, please use the following R command:
>library(MASS)
>data()
Output:
Data sets in package ‘MASS’:
Aids2 (Australian AIDS Survival Data)
Animals (Brain and Body Weights for 28 Species)
Boston (Housing Values in Suburbs of Boston)
Cars93 (Data from 93 Cars on Sale in the USA in 1993)
Cushings (Diagnostic Tests on Patients with Cushing's Syndrome)
DDT (DDT in Kale)
GAGurine (Level of GAG in Urine of children)
Insurance (Numbers of Car Insurance claims)
Melanoma (Survival from Malignant Melanoma)
OME (Tests of Auditory Perception in Children with OME)
Pima.te (Diabetes in Pima Indian Women)
Pima.tr (Diabetes in Pima Indian Women)
Pima.tr2 (Diabetes in Pima Indian Women)
Rabbit (Blood Pressure in Rabbits)
Rubber (Accelerated Testing of Tyre Rubber)
SP500 (Returns of the Standard and Poors 500)
Sitka (Growth Curves for Sitka Spruce Trees in 1988)
Sitka89 (Growth Curves for Sitka Spruce Trees in 1989)
Skye (AFM Compositions of Aphyric Skye Lavas)
Traffic (Effect of Swedish Speed Limits on Accidents)
UScereal (Nutritional and Marketing Information on US Cereals)
UScrime (The Effect of Punishment Regimes on Crime Rates)
VA (Veteran's Administration Lung Cancer Trial)
abbey (Determinations of Nickel Content)
accdeaths (Accidental Deaths in the US 1973-1978)
anorexia (Anorexia Data on Weight Change)
bacteria (Presence of Bacteria after Drug Treatments)
beav1 (Body Temperature Series of Beaver 1)
beav2 (Body Temperature Series of Beaver 2)
biopsy (Biopsy Data on Breast Cancer Patients)
birthwt (Risk Factors Associated with Low Infant Birth Weight)
cabbages (Data from a cabbage field Trial)
caith (Colours of Eyes and Hair of People in Caithness)
cats (Anatomical Data from Domestic Cats)
cement (Heat Evolved by Setting Cements)
chem (Copper in Wholemeal Flour)
coop (Co-operative Trial in Analytical Chemistry)
cpus (Performance of Computer CPUs)
crabs (Morphological Measurements on Leptograpsus Crabs)
deaths (Monthly Deaths from Lung Diseases in the UK)
Drivers (Deaths of Car Drivers in Great Britain 1969-84)
eagles (Foraging Ecology of Bald Eagles)
epil (Seizure Counts for Epileptics)
farms (Ecological Factors in Farm Management)
fgl (Measurements of Forensic Glass Fragments)
forbes (Forbes' Data on Boiling Points in the Alps)
galaxies (Velocities for 82 Galaxies)
gehan (Remission Times of Leukaemia Patients)
genotype (Rat Genotype Data)
geyser (Old Faithful Geyser Data)
gilgais (Line Transect of Soil in Gilgai Territory)
hills (Record Times in Scottish Hill Races)
housing (Frequency Table from a Copenhagen Housing Conditions Survey)
immer (Yields from a Barley Field Trial)
leuk (Survival Times and White Blood Counts for Leukaemia Patients)
mammals (Brain and Body Weights for 62 Species of Land Mammals)
mcycle (Data from a Simulated Motorcycle Accident)
Menarche (Age of Menarche in Warsaw)
michelson (Michelson's Speed of Light Data)
minn38 (Minnesota High School Graduates of 1938)
Motors (Accelerated Life Testing of Motorettes)
muscle (Effect of Calcium Chloride on Muscle Contraction in Rat Hearts)
newcomb (Newcomb's Measurements of the Passage Time of Light)
nlschools (Eighth-Grade Pupils in the Netherlands)
npk (Classical N, P, K Factorial Experiment)
npr1 (US Naval Petroleum Reserve No. 1 data)
oats (Data from an Oats Field Trial)
painters (The Painter's Data of de Piles)
Petrol (N. L. Prater's Petrol Refinery Data)
phones (Belgium Phone Calls 1950-1973)
quine (Absenteeism from School in Rural New South Wales)
road (Road Accident Deaths in US States)
rotifer (Numbers of Rotifers by Fluid Density)
ships (Ships Damage Data)
shoes (Shoe wear data of Box, Hunter and Hunter)
shrimp (Percentage of Shrimp in Shrimp Cocktail)
shuttle (Space Shuttle Autolander Problem)
snails (Snail Mortality Data)
steam (The Saturated Steam Pressure Data)
stormer (The Stormer Viscometer Data)
Survey (Student Survey Data)
synth.te (Synthetic Classification Problem)
synth.tr (Synthetic Classification Problem)
topo (Spatial Topographic Data)
waders (Counts of Waders at 15 Sites in South Africa)
whiteside (House Insulation: Whiteside's Data)
wtloss (Weight Loss Data from an Obese Patient)
More Information about R Datasets
Please refer to the following video for more information about this topic:
Follow us on Facebook: