R/utils.R

Defines functions .sys_file

Documented in .sys_file

#' @title `system.file()` wrapper
#'
#' @description  Use to access files in `inst/`
#'
#' @param file_path Character of target file relative to `/inst`
#'
.sys_file <- function(file_path) {
  stopifnot(is.character(file_path) && length(file_path) == 1L)
  system.file(file_path, package = "ps50sr", mustWork = TRUE)
}
cjcallag/ps50sr documentation built on Dec. 19, 2021, 5:11 p.m.