library(help = "datasets")
Datasets
1 Datasets Inbuilt Package
2 Quakes Description
The data set give the locations of 1000 seismic events of MB > 4.0. The events occurred in a cube near Fiji since 1964.
?quakes
summary(quakes)
lat long depth mag
Min. :-38.59 Min. :165.7 Min. : 40.0 Min. :4.00
1st Qu.:-23.47 1st Qu.:179.6 1st Qu.: 99.0 1st Qu.:4.30
Median :-20.30 Median :181.4 Median :247.0 Median :4.60
Mean :-20.64 Mean :179.5 Mean :311.4 Mean :4.62
3rd Qu.:-17.64 3rd Qu.:183.2 3rd Qu.:543.0 3rd Qu.:4.90
Max. :-10.72 Max. :188.1 Max. :680.0 Max. :6.40
stations
Min. : 10.00
1st Qu.: 18.00
Median : 27.00
Mean : 33.42
3rd Qu.: 42.00
Max. :132.00
There are two clear planes of seismic activity. One is a major plate junction; the other is the Tonga trench off New Zealand. These data constitute a subsample from a larger dataset of containing 5000 observations.
3 Carbon Dioxide Uptake in Grass Plants Description
The CO2
data frame has 84 rows and 5 columns of data from an experiment on the cold tolerance of the grass species Echinochloa crus-galli.
vars n mean sd median trimmed mad min max range skew
Plant* 1 84 6.50 3.47 6.5 6.50 4.45 1.0 12.0 11.0 0.00
Type* 2 84 1.50 0.50 1.5 1.50 0.74 1.0 2.0 1.0 0.00
Treatment* 3 84 1.50 0.50 1.5 1.50 0.74 1.0 2.0 1.0 0.00
conc 4 84 435.00 295.92 350.0 408.53 259.46 95.0 1000.0 905.0 0.72
uptake 5 84 27.21 10.81 28.3 27.33 14.83 7.7 45.5 37.8 -0.10
kurtosis se
Plant* -1.26 0.38
Type* -2.02 0.05
Treatment* -2.02 0.05
conc -0.68 32.29
uptake -1.35 1.18
The \(CO_2\) uptake of six plants from Quebec and six plants from Mississippi was measured at several levels of ambient \(CO_2\) concentration. Half the plants of each type were chilled overnight before the experiment was conducted.
4 Biochemical Oxygen Demand Description
The BOD
data frame has 6 rows and 2 columns giving the biochemical oxygen demand versus time in an evaluation of water quality.
?BOD
df<-BOD
5 Edgar Anderson’s Iris Data Description
This famous (Fisher’s or Anderson’s) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica.
[1] setosa versicolor virginica
Levels: setosa versicolor virginica
lapply(iris, is.numeric)
$Sepal.Length
[1] TRUE
$Sepal.Width
[1] TRUE
$Petal.Length
[1] TRUE
$Petal.Width
[1] TRUE
$Species
[1] FALSE
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
TRUE TRUE TRUE TRUE FALSE
sapply(iris, is.numeric)
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
TRUE TRUE TRUE TRUE FALSE
6 Intercountry Life-Cycle Savings Data Description
Data on the savings ratio 1960–1970.
?LifeCycleSavings
df<-LifeCycleSavings
library(stargazer)
Please cite as:
Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
stargazer::stargazer(df,
type = "text")
================================================
Statistic N Mean St. Dev. Min Max
------------------------------------------------
sr 50 9.671 4.480 0.600 21.100
pop15 50 35.090 9.152 21.440 47.640
pop75 50 2.293 1.291 0.560 4.700
dpi 50 1,106.758 990.869 88.940 4,001.890
ddpi 50 3.758 2.870 0.220 16.710
------------------------------------------------
7 Level of Lake Huron 1875–1972 Description
Annual measurements of the level, in feet, of Lake Huron 1875–1972
?LakeHuron
df<- LakeHuron
A time series of length 98.
8 Diameter, Height and Volume for Black Cherry Trees Description
This data set provides measurements of the diameter, height and volume of timber in 31 felled black cherry trees. Note that the diameter (in inches) is erroneously labelled Girth in the data. It is measured at 4 ft 6 in above the ground.
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.3 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ ggplot2::%+%() masks psych::%+%()
✖ ggplot2::alpha() masks psych::alpha()
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
glimpse(df)
Rows: 31
Columns: 3
$ Girth <dbl> 8.3, 8.6, 8.8, 10.5, 10.7, 10.8, 11.0, 11.0, 11.1, 11.2, 11.3, …
$ Height <dbl> 70, 65, 63, 72, 81, 83, 66, 75, 80, 75, 79, 76, 76, 69, 75, 74,…
$ Volume <dbl> 10.3, 10.3, 10.2, 16.4, 18.8, 19.7, 15.6, 18.2, 22.6, 19.9, 24.…
9 Average Heights and Weights for American Women Description
This data set gives the average heights and weights for American women aged 30–39.
?women
df <- women