api_same_at: Test if a function's API is unchanged

Description Usage Arguments Details Value Examples

Description

api_same_at reports whether a function had the same API at a previous version or date.

Usage

1
2
api_same_at(fun, version = version_at_date(package, date), package,
  date = NULL, quiet = TRUE, current_fun = NULL, ...)

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.)

current_fun

Current function for comparison. By default, fun in the current version of the package (which is assumed to be already installed). This must be an actual function, not the name of one: use fun_at().

...

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

Details

If fun is not exported at version, api_same_at returns FALSE with a warning.

Value

TRUE or FALSE.

Examples

1
2
3
4
5
6
## Not run: 
api_same_at("clipr::write_clip", version = "0.1.1")
# equivalently
api_same_at("write_clip", "clipr", "0.1.1")

## End(Not run)

hughjonesd/pastapi documentation built on Sept. 9, 2019, 12:56 p.m.