R/pkg_ref_cache_help.R

Defines functions pkg_ref_cache.help.pkg_source pkg_ref_cache.help.pkg_install pkg_ref_cache.help

Documented in pkg_ref_cache.help.pkg_install pkg_ref_cache.help.pkg_source

#' Cache a list of available help files as LaTeX objects
#'
#' @inheritParams pkg_ref_cache
#' @family package reference cache
#' @return a \code{pkg_ref} object
#' @keywords internal
#' @noRd
pkg_ref_cache.help <- function(x, name, ...) {
  UseMethod("pkg_ref_cache.help")
}


#' Cache a list of available help files as LaTeX objects
#'
#' @importFrom tools Rd_db parseLatex
#' @return a \code{pkg_ref} object
#' @keywords internal
pkg_ref_cache.help.pkg_install <- function(x, name, ...) {
  tools::Rd_db(package = x$name)
}


#' Cache a list of available help files as LaTeX objects
#'
#' @importFrom tools Rd_db parseLatex
#' @keywords internal
pkg_ref_cache.help.pkg_source <- function(x, name, ...) {
  tools::Rd_db(dir = x$path)
}

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.