Learn R Programming

pacs (version 0.6.0)

pac_lifeduration: Package version life duration at specific Date or for a specific version

Description

a package life duration for a certain version or at a specific Date. By default works for the newest package version.

Usage

pac_lifeduration(
  pac,
  version = NULL,
  at = NULL,
  lib.loc = .libPaths(),
  repos = biocran_repos(),
  source = c("cran", "crandb")
)

Value

difftime, number of days package version was the newest one.

Arguments

pac

character a package name.

version

character version of a package. Default: NULL

at

Date from which to take the version. Default: NULL

lib.loc

character vector of search paths with local packages. Default: .libPaths()

repos

character vector of repositories URLs to use. By default checking CRAN and newest Bioconductor per R version. Default pacs::biocran_repos()

source

character one of c("cran", "crandb"). Using the MEATCRAN CRANDB or the direct web page download from CRAN. When "crandb" is set then options(pacs.crandb_ntry = 3) and options(pacs.crandb_nsleep = 0.001) can be used to control the fetch. "pacs.crandb_ntry" can be used to set the maximum number of try outs, by default 3. "pacs.crandb_nsleep" can be used to set the sleep duration between fetch try outs, by default 0.001. Default: "cran"

Examples

Run this code
if (FALSE) {
pacs::pac_lifeduration("memoise")
pacs::pac_lifeduration("memoise", source = "cran")
pacs::pac_lifeduration("dplyr", version = "0.8.0")
pacs::pac_lifeduration("dplyr", at = as.Date("2019-02-14"))
# For Bioconductor packages it will work only for the newest per R version and installed ones.
pacs::pac_lifeduration("S4Vectors")
}

Run the code above in your browser using DataLab