Skip to contents

This function queries the selected repositories for the available packages and collects the unique occurrences.

Usage

wood_packages(repos = "cran")

Arguments

repos

character()
A vector of repositories to query. The following values are available:

  • "cran", meaning CRAN;

  • "bioc@release", meaning Bioconductor, where release should be replaced with a valid Bioconductor release code or one of "release", "devel";

  • "runiverse@universe", meaning R-universe, where universe should be replaced with a valid universe name (e.g. turtletopia);

  • "github/user", meaning GitHub, where user should be replaced with a valid user or organization name (e.g. turtletopia);

  • "gitlab/user", meaning GitLab, where user should be replaced with a valid user or group name (e.g. r-packages);

  • "local#index", meaning a local library, where index should be replaced with an integer index of a library in base::.libPaths() or an all keyword;

  • "core", meaning base R packages;

  • a URL if none of the above is matched.

Value

A character vector of available packages.

Examples

print(wood_packages(c("local#all", "bioc@1.7", "cran", "core")), max = 15)
#>  [1] "A3"           "AATtools"     "ABACUS"       "ABC.RAP"      "ABCanalysis" 
#>  [6] "ABCoptim"     "ABHgenotypeR" "ABM"          "ABPS"         "ABRSQOL"     
#> [11] "ABSurvTDC"    "ACA"          "ACDm"         "ACE.CoCo"     "ACEP"        
#>  [ reached getOption("max.print") -- omitted 21938 entries ]
wood_packages(c("https://colinfay.me", "runiverse@turtletopia"))
#>  [1] "attempt"        "aurrera"        "craneur"        "deepdep"       
#>  [5] "devaddins"      "dockerfiler"    "fryingpane"     "gglgbtq"       
#>  [9] "ggpizza"        "jekyllthat"     "languagelayeR"  "openaccess"    
#> [13] "proustr"        "rgeoapi"        "rpinterest"     "tidystringdist"
#> [17] "versionsort"    "woodendesc"    
# By default, only CRAN is queried:
print(wood_packages(), max = 15)
#>  [1] "A3"           "AATtools"     "ABACUS"       "ABC.RAP"      "ABCanalysis" 
#>  [6] "ABCoptim"     "ABHgenotypeR" "ABM"          "ABPS"         "ABRSQOL"     
#> [11] "ABSurvTDC"    "ACA"          "ACDm"         "ACE.CoCo"     "ACEP"        
#>  [ reached getOption("max.print") -- omitted 21921 entries ]