R datasets and related functions
vector
euro #Euro exchange rate, the length is 11, each element is named
landmasses #48 land areas, each named
precip #a named vector with a length of 70
rivers #The length of 141 rivers in North America
state.abb #The two-letter abbreviations of the 50 states of the United States
state.area #The area of the 50 states of the United States
state.name #The full name of the 50 states in the United States
factor
state.division #Classification of 50 states in the United States, 9 categories
state.region #Geographic classification of the 50 states in the United States
matrix, array
euro.cross #11 currency exchange rate matrix
freeny.x #Records of four factors that affect revenue in each quarter
state.x77 #Eight indicators of the 50 states in the United States
USPersonalExpenditure #Data of 5 years in 5 consumption directions
VADeaths #1940 Virginia death rate (per thousand people)
volcano #Geographic information of a volcanic area (10m×10m grid)
WorldPhones # Total number of telephone calls in 7 years for 8 regions
iris3 #3 species of iris morphological data
Titanic #Titanic Crew Statistics
UCBAdmissions #Berkeley 1973 Faculties, Admissions and Gender Frequency
crimtab #3000 male criminals left middle finger length and height relationship
HairEyeColor #592 frequency of human hair color, eye color and gender
occupationalStatus #British male father and son occupational connection
Matrix-like
eurodist #The distance matrix of 12 cities in Europe, only the lower triangular part
Harman23.cor #305 Correlation coefficient matrix of eight morphological indicators for girls
Harman74.cor #Correlation coefficient matrix of 24 psychological indicators of 145 children
data frame
airquality #New York 1973 May-September daily air quality
anscombe #Four sets of xy data, although they have similar statistics, but the actual data are quite different
attenu # Observation data of 23 earthquakes in California from multiple observation stations
attitude #The survey results of 30 departments in seven aspects, the survey results are the percentage of 35 employees in the same department agreeing
beaver1 #The body temperature data of a beaver every 10 minutes, a total of 114 data
beaver2 #The body temperature data of another beaver every 10 minutes, a total of 100 data
BOD #With the improvement of water quality, the change of oxygen demand (mg/l) for biochemical reactions over time (days)
cars #Influence of car speed on braking distance in the 1920s
chickwts #The effect of different diet types on the growth rate of chicks
esoph #A case-control study of esophageal cancer in France
faithful #Eruption time and duration of a geyser
Formaldehyde #The reading of the spectrophotometer when two methods determine the concentration of formaldehyde
Freeny #Records of quarterly revenue and other four factors
dating from #Paired case-control data for conditional logistic regression
InsectSprays #The number of insects when using different insecticides
iris #3 species of iris morphological data
LifeCycleSavings #Savings rates in 50 countries
longley #Strong collinear macroeconomic data morley #Light speed measurement test data
mtcars #Data for 32 cars on 11 metrics
OrchardSprays #Using the Latin square design to study the effects of different sprays on bees
PlantGrowth #The effect of three treatments on plant yield
pressure #temperature and air pressure
Puromycin #Effect of cofactor concentration on enzymatic reaction in two kinds of cells
quakes #1000 earthquake observation data (magnitude>4)
randu #Use RANDU in FORTRAN in VMS1.5 to generate random numbers in groups of three, a total of 400 groups. There is something wrong with that random number. It has been repaired in versions above VMS2.0.
Rock #48 Morphological data of the stone
sleep #The hypnotic effect of two drugs
stackloss #Chemical plant converts ammonia to nitric acid data
swiss #Swiss Fertility and Socioeconomic Indicators
ToothGrowth #VC dose and intake method on the effect of guinea pig teeth trees #树morphological index
USArrests #Four crime rate indicators for the 50 US states
USJudgeRatings #43 lawyers on 12 evaluation metrics
warpbreaks # loom abnormal data
women #15 women's height and weight
the list
state.center #The longitude and latitude of the center of 50 states in the United States
class DataFrame
ChickWeight #Effect of diet on chicken growth
CO2 #Differences in CO2 uptake by hardy plants
DNase #During several experiments, the relationship between DNase concentration and optical density
Indometh #pharmacokinetic data of a drug
Loblolly #loblolly pine height, age and provenance Orange #orange tree growth data
Theoph #Theophylline pharmacokinetic data
time series data
airmiles #United States 1937-1960 passenger mileage revenue (actual seats sold multiplied by flight miles)
AirPassengers #Box & Jenkins Airlines International Passengers Monthly, 1949-1960
austres #Australia 1971-1994 quarterly population (in thousands)
BJsales #A time series about sales
BJsales.lead #The leading indicator of the previous indicator (leading indicator)
co2 #1959-1997 monthly atmospheric CO2 concentration (ppm)
discoveries #1860-1959 The number of great discoveries or inventions per year
ldeaths # Monthly deaths from bronchitis, emphysema and asthma in the UK, 1974-1979
fdeaths #The female part of the aforementioned mortality
mdeaths #The male part of the aforementioned mortality
freeny.y # quarterly income
JohnsonJohnson # Quarterly 1960-1980
Dividends on Johnson & Johnson Stock
LakeHuron #1875-1972 record of the water level of a certain lake
lh #Luteinizing hormone level, measured every 10 minutes
ynx #1821-1934 Canadian lynx data
nhtemp #1912-1971 annual average temperature
Nile #1871-1970 Nile Flow
nottem #1920-1939 monthly atmospheric temperature
presidents #1945-1974 Quarterly U.S. presidential approval rating
UKDriverDeaths #Number of UK drivers killed or seriously injured each month, 1969-1984
sunspot.month #1749-1997 monthly sunspot number
sunspot.year #1700-1988 The number of sunspots per year
sunspots #1749-1983 monthly sunspot count
treering #Normalized tree ring data
UKgas #1960-1986 Monthly UK natural gas consumption
USAccDeaths #1973-1978 US Monthly Accidental Deaths
uspop #1790–1970 Total population of the United States every decade (in millions)
WWWusage #Number of network connections per minute
Seatbelts #Multivariate time series. and
Same time period for UKDriverDeaths, reflecting more factors.
EuStockMarkets #Multivariate time series. Each working day record for the four main indicators of European stock markets
Dataset related functions
Enter the data set name directly to display the content of the data set
>数据集名称
如:
> mtcars
Use the help function to view the specific content of the data set
>help("数据集名称")
#如
> > help("mtcars")
In addition to the built-in data sets, many extension packages also have built-in data sets. These data sets are used as cases of built-in functions. These data sets are also loaded when the R package is loaded.
data(package="R包的名字") #可以列出R包中包含的每个数据集
data(package=.packages(all.available = TRUE)) #显示R中所有可用数据集
If you don't want to load the R package, but want to use the dataset in R, use the data function to load it
#data(数据集的名字,package = "数据集所在R包名")
#如:
> help("Nile") #先使用help函数查找相关数据集的信息
> data(Nile,package = "datasets") #不加载R包,使用里面的内置数据集
> Nile #加载Nile数据集