Skip to contents

Oftentimes, the release date of the package does not correspond to the date when the package is available in the PPM. Usually it takes one day for the PPM to sync with the CRAN. This function will return the date when the package is available in the PPM.

Usage

get_avail_date(remote_ref, start = get_release_date(remote_ref))

# S3 method for class 'remote_ref_cran'
get_avail_date(remote_ref, start = get_release_date(remote_ref))

# S3 method for class 'remote_ref_standard'
get_avail_date(remote_ref, start = get_release_date(remote_ref))

# S3 method for class 'remote_ref'
get_avail_date(remote_ref, start = get_release_date(remote_ref))

Arguments

remote_ref

(remote_ref) object created with pkgdepends::parse_pkg_ref()

start

(Date) optional, the date when the package was released

Value

Date. This can be safely used as a snapshot date for the PPM.

Examples

if (FALSE) { # Sys.getenv("R_USER_CACHE_DIR", "") != ""
get_avail_date(pkgdepends::parse_pkg_ref("cran::dplyr"))
get_avail_date(pkgdepends::parse_pkg_ref("cran::dplyr@1.1.0"))
}
if (FALSE) { # Sys.getenv("R_USER_CACHE_DIR", "") != ""
get_avail_date(pkgdepends::parse_pkg_ref("dplyr"))
get_avail_date(pkgdepends::parse_pkg_ref("dplyr@1.1.0"))
}
if (FALSE) { # Sys.getenv("R_USER_CACHE_DIR", "") != "" && gh::gh_token() !=      ""
get_avail_date(pkgdepends::parse_pkg_ref("bioc::MultiAssayExperiment"))
get_avail_date(pkgdepends::parse_pkg_ref("tidyverse/dplyr@v1.1.0"))
}