fun_at: Retrieve a function from a package version

Description Usage Arguments Details Value Examples

View source: R/interface.R

Description

Retrieve a function from a package version

Usage

1
2
fun_at(fun, version = version_at_date(package, date), package, date = NULL,
  quiet = TRUE, allow_core = FALSE, ...)

Arguments

fun

Function name as a character string. fun can be an S3 method; S4 methods aren't yet supported.

version

Version as a character string. If omitted, use the version available at date.

package

Package. Alternatively, specify the function name as e.g. "package::function".

date

Date, as a character string that can be read by as.Date() e.g. "2016-01-01".

quiet

Logical. Try to minimize output from package installation. (Some output comes from R CMD INSTALL and may be unavoidable.)

allow_core

See below.

...

Arguments passed to versions::install.versions() or remotes::install_version(), and thence to install.packages(). Ncpus may be useful.

Details

By default, you cannot get functions from previous versions of R core packages, which are not available on CRAN/MRAN. If allow_core is TRUE, then a function will be returned from the rcheology dataset, with a null body but the same formal arguments as the historical function.

Value

The function itself.

Examples

1
2
3
4
## Not run: 
fun_at("write_clip", "clipr", "0.1.1")

## End(Not run)

hughjonesd/apicheck documentation built on July 17, 2018, 7:21 a.m.