To Documents
Installing and Using an R Package
This shows that the packages stats, graphics, grDevices, utils, datasets, methods, and base are all preloaded when R is invoked.
To install the R package leaps from the internet, use the install.packages function:
> install.packages("leaps")
To load the R package leaps after it has been installed, use the library function:
> library(leaps)
If you use the search function again, you can verify that the leaps package is now loaded:
> search()
[1] .GlobalEnv package:leaps package:stats
[4] package:graphics package:grDevices package:utils
[7] package:datasets package:methods Autoloads
[10] package:base