Get the latest version of pkgs by as_of_date. Could take a while to run if input pkgs contains multiple packages.

get_pkg_version(
  pkgs = PKG_GLOBAL_ENV$PA_PKGS,
  as_of_date = PKG_GLOBAL_ENV$PKG_FREEZE_DATE
)

Arguments

pkgs

character vector of the names of packages for which to query available versions

as_of_date

(character, convertible to date) date of interest to subset versions of pkgs

Value

a data.table with the following columns:

  • package: the name of the package

  • version: the version of the package

  • date: the date of the version release

Examples

get_pkg_version( pkgs = c("data.table", "knitr"), as_of_date = "2019-01-01" )
#> package version date #> 1: data.table 1.11.8 2018-09-30 #> 2: knitr 1.21 2018-12-10