help(package='datasets')
View dataset help
data()
Access to the data set The
first is the name of the data set, and the content of the data set is introduced later, including all the data types used in R (vectors, matrices, lists, factors, data frames, time series, etc.).
The data can be output by directly inputting the name of the data set: the names of
these data sets are built-in, and it is generally best to avoid duplication when naming variables, otherwise the data set will be replaced.
help("mtcars")
View the information of a specific data set
List the data sets in the R expansion pack to load the expansion pack
data(package="MASS")
Display all available data sets in R
data(package=.packages(all.available = TRUE))
If you do not want to load the R package but want to load the data set in it, directly use the data function to load the data set
eg
data(Chile,package="car")
Chile