R/scidesignR_example.R

Defines functions scidesignR_example

Documented in scidesignR_example

#' Get path to scidesignR example
#'
#' scidesignR comes bundled with a few data sets in its `inst/extdata`
#' directory. This function make them easy to access
#'
#' @param file Name of file. If `NULL`, the example files will be listed.
#' @export
#' @examples
#' scidesignR_example()
#' scidesignR_example("nhefshwdat.csv")


scidesignR_example <- function(file = NULL){
  if (is.null(file)) {
    dir(system.file("extdata", package = "scidesignR"))
  }
  else {
    system.file("extdata", file, package = "scidesignR", mustWork = TRUE)
  }
}

Try the scidesignR package in your browser

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

scidesignR documentation built on April 27, 2022, 9:06 a.m.