pac_health: CRAN package health state at a specific Date or for a...

View source: R/lifeduration.R

pac_healthR Documentation

CRAN package health state at a specific Date or for a specific version

Description

a package health for a certain version or at a specific Date. A healthy package was published for more than x days, where default is 14 days. CRAN team gives around one/two week to resolved a package which gave errors under the check page. The newest release is checked for any warnings/errors on the R CRAN package check page.

Usage

pac_health(
  pac,
  version = NULL,
  at = NULL,
  limit = 14,
  scope = c("ERROR", "FAIL"),
  flavors = NULL,
  lib.loc = .libPaths(),
  repos = "https://cran.rstudio.com/",
  source = c("crandb", "cran")
)

Arguments

pac

character a package name.

version

character package version, By default the newest version is taken. Default: NULL

at

Date old version of package. Default: NULL

limit

numeric at least days to treat as healthy, ">=limit". Default: 14

scope

character vector scope of R CRAN check pages statuses to consider, any of c("ERROR", "FAIL", "WARN", "NOTE"). Default c("ERROR", "FAIL")

flavors

character vector of CRAN machines to consider, which might be retrieved with pacs::cran_flavors()$Flavor. By default all CRAN machines are considered, NULL value. Default NULL

lib.loc

character vector. Is omitted for non NULL version. Default: .libPaths()

repos

character vector URLs of the repositories to use. Default https://cran.rstudio.com/

source

character one of c("crandb", "cran"). Using the MEATCRAN DB or the direct web page download from CRAN. Default: "crandb"

Value

logical if a package is healthy.

Note

Results are cached for 30 minutes with memoise package. The crandb R packages database is a part of METACRAN project, source: Csárdi G, Salmon M (2022). pkgsearch: Search and Query CRAN R Packages. https://github.com/r-hub/pkgsearch, https://r-hub.github.io/pkgsearch/. For source = "cran"the function will scrap two CRAN URLS. Works only with CRAN packages. Please as a courtesy to the R CRAN, don't overload their servers by constantly using this function.

Examples

## Not run: 
pacs::pac_health("memoise")
pacs::pac_health("dplyr", version = "0.8.0", limit = 14)
pacs::pac_health("dplyr", at = as.Date("2019-02-14"))
pacs::pac_health("dplyr", limit = 14, scope = c("ERROR", "FAIL"))

## End(Not run)

pacs documentation built on May 11, 2022, 1:09 a.m.