I pick the dataset bigcity, which contains the population (in thousands) of 49 U.S. cities in 1920 and 1930. For more information about this dataset, please visit here or here.
library(boot)
data("bigcity")
summary(bigcity)
## u x
## Min. : 2.0 Min. : 46.0
## 1st Qu.: 43.0 1st Qu.: 58.0
## Median : 64.0 Median : 79.0
## Mean :103.1 Mean :127.8
## 3rd Qu.:120.0 3rd Qu.:130.0
## Max. :507.0 Max. :634.0
A summary table of the dataset is presented above. The dataset has 2 variables:
120-43
## [1] 77
130-58
## [1] 72
The plot below shows an increasing trend in a city population.
plot(bigcity$u, bigcity$x, xlab="1920 city population (in 1000's)", ylab="1930 city population (in 1000's)")
title("Trends in US city population: 1930 vs. 1920", "Data Source: https://astrostatistics.psu.edu/su07/R/html/boot/html/bigcity.html")