R/swc_get_cantons.R

Defines functions new_csv_file csv_file swc_get_cantons

swc_get_cantons <- function() {
  as_tibble(readr::read_csv(csv_file("mut/canton"), col_types = "iccD", lazy = FALSE))
}

csv_file <- function(name) {
  system.file("csv", paste0(name, ".csv"), package = "munch")
}

new_csv_file <- function(...) {
  paste0(file.path("inst/csv", ...), ".csv")
}
cynkra/munch documentation built on Dec. 15, 2024, 6:06 a.m.