tests/testthat/utils.R

# subset to the first (bottom) three versions available
first_three <- function (df) {
  idx <- nrow(df) - 3:1 + 1
  df[idx, ]
}

# remove package if it's installed
purge <- function (pkg) {
  version <- installed.versions(pkg)
  if (!is.na(version))
    remove.packages(pkg)
}
goldingn/versions documentation built on May 17, 2019, 7:42 a.m.