R/load_tipmap_data.R

Defines functions load_tipmap_data

Documented in load_tipmap_data

#' Load exemplary datasets
#'
#' @description
#' Loads one of three exemplary datasets in the package.
#'
#' @param file The dataset to be loaded.
#'
#' @return A pre-saved dataset.
#' @export
#' @examples
#'
#' load_tipmap_data(file = "tipdat.rds")
#' load_tipmap_data(file = "tipmapPrior.rds")
#' load_tipmap_data(file = "tipPost.rds")
#'
load_tipmap_data <- function(file) {
  path <- system.file("extdata", file, package = "tipmap")
  data <- readRDS(path)
  return(data)
}

Try the tipmap package in your browser

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

tipmap documentation built on Aug. 14, 2023, 5:09 p.m.