- A library is simply a directory containing installed packages.
- Almost every one has at least two libraries:
- one for packages you're installed
- one for the packages that come with every R installation (like base, stats, etc).
.libPaths()
## [1] "C:/Users/wench/Documents/R/win-library/3.6"
## [2] "C:/Program Files/R/R-3.6.1/library"
lapply(.libPaths(), dir)[[2]]
## [1] "base" "boot" "class" "cluster"
## [5] "codetools" "compiler" "datasets" "foreign"
## [9] "graphics" "grDevices" "grid" "KernSmooth"
## [13] "lattice" "MASS" "Matrix" "methods"
## [17] "mgcv" "nlme" "nnet" "parallel"
## [21] "rpart" "spatial" "splines" "stats"
## [25] "stats4" "survival" "tcltk" "tools"
## [29] "translations" "utils"