Qbik
Qbik

Reputation: 6147

Listing all packages in given repository

How to list all packages available in given repository or list all packages available without using list from : http://cran.r-project.org/web/packages/available_packages_by_name.html

Upvotes: 0

Views: 213

Answers (1)

Andrie
Andrie

Reputation: 179448

Use available.packages() to do this.

Try, for example:

options(repos = "http://cran.revolutionanalytics.com")
p <- available.packages()
head(p)

To extract the package names, get the column called "Package".

head(p[, "Package"])
           A3   ABCExtremes      ABCoptim         ABCp2        ACCLMA           ACD 
         "A3" "ABCExtremes"    "ABCoptim"       "ABCp2"      "ACCLMA"         "ACD" 

Upvotes: 4

Related Questions