Skip to contents

CatalanHealthAreas includes the full original shapefile data of the ABSs at inst/extdata directory. This function make them easy to access.

Usage

path_to_file(path = NULL)

Source

This function is adapted from readxl::readxl_example() and afrobat::path-to-file.R.

Arguments

path

Name of file in quotes with extension; "ABS_2018.dbf", "ABS_2018.prj", "ABS_2018.qpj", "ABS_2018.shp" and "ABS_2018.shx" will work. If NULL, the example files will be listed.

Examples

# load libraries
library(terra)
#> terra 1.7.78

path_to_file("ABS_2018.shp")
#> [1] "/tmp/RtmpsIS5Qi/temp_libpathc4a02017565f/CatalanHealthAreas/extdata/ABS_2018.shp"