R/example.R

Defines functions mdb_example

Documented in mdb_example

#' Get path to mdbr example
#'
#' mdbr comes bundled with a sample file from the
#' [nycflights13](https://github.com/tidyverse/nycflights13) package in its
#' inst/extdata directory. This function make it easy to access.
#'
#' @param path path to the Microsoft Access file.
#' @export
mdb_example <- function(path = "nycflights13.mdb") {
  if (!is.character(path)) {
    dir(system.file("extdata", package = "mdbr"))
  } else {
    system.file("extdata", path, package = "mdbr", mustWork = TRUE)
  }
}

Try the mdbr package in your browser

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

mdbr documentation built on May 29, 2024, 7:27 a.m.