knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

Travis-CI Build Status AppVeyor Build Status Coverage status

apicheck

apicheck is a small R package to explore the historical API of functions in CRAN packages. It is designed to help you work out minimum version requirements for packages mentioned in your DESCRIPTION file.

apicheck works by downloading package versions from CRAN and temporarily installing them in a special directory.

Installation

install.packages("remotes") 
# You'll need these:
remotes::install_github("hughjonesd/rcheology")
remotes::install_github("r-lib/pkgapi")

remotes::install_github("hughjonesd/apicheck")

Example

From clipr's NEWS file:

clipr 0.4.0 introduces dr_clipr():

library(apicheck)
set_lib_dir(".apicheck")
options(repos = "https://cloud.r-project.org")
library(apicheck)
fun_exists_at("clipr::dr_clipr", "0.4.0")
fun_exists_at("clipr::dr_clipr", "0.3.3")
when_fun_exists("clipr::dr_clipr", report = "brief") # binary search

clipr 0.2.0 : several changes to write_clip.

api_same_at("clipr::write_clip", "0.2.0")
api_same_at("clipr::write_clip", "0.1.1")
when_api_same("clipr::write_clip", report = "full", search = "all") # check all versions

To dig more deeply:

args(fun_at("clipr::write_clip", "0.1.1"))
args(fun_at("clipr::write_clip", "0.2.0"))
help_at("clipr::write_clip", "0.1.1") 

To see all changes between two versions, use compare_versions:

cv <- compare_versions("clipr", "0.1.1", "0.2.0")
summary(cv)

You can also check base packages, using the info from rcheology:

fun_exists_at("base::paste0", "2.14.0")
fun_exists_at("base::paste0", "2.15.0")

Performance

Performance tests.



hughjonesd/apicheck documentation built on Sept. 9, 2019, 12:55 p.m.