Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 167

Further information – All available packages

Оглавление

R provides also functionality to get a list of all packages – there is no need to use a web-crawling or scraper interface.

# available.packages() gets a list: pkgs <- available.packages(filters = “duplicates”) colnames(pkgs) ## [1] “Package” “Version” ## [3] “Priority” “Depends” ## [5] “Imports” “LinkingTo” ## [7] “Suggests” “Enhances” ## [9] “License” “License_is_FOSS” ## [11] “License_restricts_use” “OS_type” ## [13] “Archs” “MD5sum” ## [15] “NeedsCompilation” “File” ## [17] “Repository” # We don't need all, just keep the name: pkgs <- pkgs[,‘Package’] # Show the results: print(paste(‘Today, there are’, length(pkgs), ‘packages for R.’)) ## [1] “Today, there are 15477 packages for R.” available.packages()

The Big R-Book

Подняться наверх