Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 168
Further information – All installed packages
ОглавлениеWe can use the function library()
to get a list of all packages that are installed on our machine.
# Get the list (only names): my_pkgs <- library()$results[,1] ## Warning in library(): library ‘/usr/local/lib/R/site-library’ contains no packages # Show the results: print(paste(‘I have’, length(my_pkgs), ‘packages for R.’)) ## [1] “I have 282 packages for R.”
Alternatively, you can use the function installed.packages()
library()
installed.packages()