min_r_version: Find minimum R version required for package

Description Usage Arguments Source Examples

View source: R/util.r

Description

Recursively search dependencies for R version, and find the highest stated R version requirement.

Usage

1

Arguments

pkg

string with name of package to check

Source

Based on ideas from http://stackoverflow.com/questions/38686427/determine-minimum-r-version-for-all-package-dependencies

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
base <- c(
  "base", "compiler", "datasets", "grDevices", "graphics",
  "grid", "methods", "parallel", "profile", "splines", "stats",
  "stats4", "tcltk", "tools", "translations"
)
## Not run: 
base_reqs <- lapply(base, min_r_version)
contrib <- c(
  "KernSmooth", "MASS", "Matrix", "boot",
  "class", "cluster", "codetools", "foreign", "lattice",
  "mgcv", "nlme", "nnet", "rpart", "spatial", "survival"
)
contrib_reqs <- lapply(contrib, min_r_version)
min_r_version("icd")

## End(Not run)

jackwasey/jwutil documentation built on Jan. 20, 2020, 6:56 p.m.