R/ari_example.R

Defines functions ari_example

Documented in ari_example

#' Get the path to an ari example file
#'
#' This function allows you to quickly access files that are used in
#' the ari documentation.
#'
#' @param path The name of the file. If no argument is provided then
#' all of the example files will be listed.
#' 
#' @return A character string
#' @export
#' @examples
#' ari_example("ari_intro.Rmd")
ari_example <- function(path = NULL){
  if(is.null(path)) {
    list.files(system.file("test", package = "ari"))
  } else {
    system.file("test", path, package = "ari", mustWork = TRUE)
  }
}

Try the ari package in your browser

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

ari documentation built on Feb. 9, 2020, 1:07 a.m.