get_minimal_r_version: Get required minimal R version

Description Usage Arguments Value See Also Examples

View source: R/get_minimal_r_version.R

Description

This function detects the minimal required R version for the project based on minimal required R version of its dependencies. It can be used to update the Depends field of the DESCRIPTION file.

Usage

1

Arguments

pkg

a character of length 1

The name of a CRAN package or NULL (default). If NULL get minimal required R version of the local (uninstalled) project (package or compendium).

Value

A character with the minimal required R version.

See Also

Other utilities functions: get_all_dependencies(), get_all_functions(), get_licenses()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
## Update dependencies ----
add_dependencies()

## Minimal R version of a project ----
get_minimal_r_version()

## Minimal R version of a CRAN package ----
get_minimal_r_version("usethis")

## End(Not run)

rcompendium documentation built on March 24, 2021, 5:06 p.m.