Skip to contents

This function queries the selected repositories for version codes of the selected packages and collects the unique occurences.

Usage

wood_versions(packages, repos = "cran")

Arguments

packages

character()
Names of the packages to query for.

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";

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

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

  • "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 list named after queried packages, each element being a character vector of version codes.

Examples

# \donttest{
wood_versions("woodendesc", c("local#all", "runiverse@turtletopia"))
#> $woodendesc
#> [1] "0.1.0"
#> 
# Multiple packages are also possible:
wood_versions(
  c("ggplot2", "Biostrings", "woodendesc"),
  repos = c("runiverse@turtletopia", "cran", "bioc@1.5")
)
#> $ggplot2
#>  [1] "0.5"     "0.5.1"   "0.5.2"   "0.5.4"   "0.5.5"   "0.5.6"   "0.5.7"  
#>  [8] "0.6"     "0.7"     "0.8"     "0.8.1"   "0.8.2"   "0.8.3"   "0.8.4"  
#> [15] "0.8.5"   "0.8.6"   "0.8.7"   "0.8.8"   "0.8.9"   "0.9.0"   "0.9.1"  
#> [22] "0.9.2"   "0.9.2.1" "0.9.3"   "0.9.3.1" "1.0.0"   "1.0.1"   "2.0.0"  
#> [29] "2.1.0"   "2.2.0"   "2.2.1"   "3.0.0"   "3.1.0"   "3.1.1"   "3.2.0"  
#> [36] "3.2.1"   "3.3.0"   "3.3.1"   "3.3.2"   "3.3.3"   "3.3.4"   "3.3.5"  
#> [43] "3.3.6"   "3.4.0"   "3.4.1"   "3.4.2"  
#> 
#> $Biostrings
#> [1] "1.0.0"
#> 
#> $woodendesc
#> [1] "0.1.0"
#> 
# By default, only CRAN is queried:
wood_versions("versionsort")
#> $versionsort
#> [1] "1.0.0" "1.1.0"
#> 
# }