R/pkg_ref_cache_r_cmd_check.R

Defines functions pkg_ref_cache.r_cmd_check.pkg_source pkg_ref_cache.r_cmd_check

#' Run R CMD check and capture the results
#'
#' @inheritParams pkg_ref_cache
#' @family package reference cache
#' @return a \code{pkg_ref} object
#' @keywords internal
#' @noRd
pkg_ref_cache.r_cmd_check <- function(x, ...) {
  UseMethod("pkg_ref_cache.r_cmd_check")
}

pkg_ref_cache.r_cmd_check.default <- function (x, ...) {
  return(NA)
}

#' Run R CMD check and capture the results
#'
#' @inheritParams pkg_ref_cache
#' @importFrom devtools check
#' @return a \code{pkg_ref} object
#' @noRd
pkg_ref_cache.r_cmd_check.pkg_source <- function(x, ...){
  check_results <- devtools::check(x$path, quiet=TRUE)
  return(check_results)
}

Try the riskmetric package in your browser

Any scripts or data that you put into this service are public.

riskmetric documentation built on Sept. 1, 2023, 1:06 a.m.