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.
#'
#' @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 Dec. 8, 2022, 1:13 a.m.