R/helpers.R

Defines functions survey_counts escapeR_file

Documented in escapeR_file survey_counts

#' Find a bundled escapeR example file
#'
#' @param filename Name of a file in `inst/extdata`.
#' @return Full path to the requested file.
escapeR_file <- function(filename) {
  path <- system.file("extdata", filename, package = "escapeR")
  if (!nzchar(path)) {
    stop("Could not find bundled file: ", filename, call. = FALSE)
  }
  path
}

#' Return the small survey data set used in the game
#'
#' @return A data frame with site, habitat, count, distance, and detection fields.
survey_counts <- function() {
  .survey_counts()
}

Try the escapeR package in your browser

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

escapeR documentation built on Sept. 27, 2026, 5:06 p.m.