Skip to contents

Checks whether the installed R version is >= a cached reference version. Intended to level up the R version in use between multiple users of the same code (e.g. contributors to a specific R project).

Usage

lvl_up_r(path_min_vrsn, update_min_vrsn = FALSE)

Arguments

path_min_vrsn

Path to the cached R version string.

update_min_vrsn

Whether or not to overwrite path_min_vrsn with the currently installed R version string iff the latter is higher than the former.

Value

Currently installed R version as a numeric version, invisibly.

Details

If the file path_min_vrsn exists, it is checked whether the installed R version is greater than or equal to the version number stored in that file, and if not, an alert is displayed.

If update_min_vrsn is set to TRUE and the file path_min_vrsn doesn't exist or contains an R version string that's lower than the currently installed version of R, path_min_vrsn is overwritten with the currently installed R version string.

See also

Other development environment currentness functions: lvl_up_quarto(), lvl_up_rstudio(), update_rpkgs(), update_salims_pkgs(), update_zdaarau_pkgs()