tigris_cache_dir: Set the cache directory to store shapefiles with tigris

View source: R/helpers.R

tigris_cache_dirR Documentation

Set the cache directory to store shapefiles with tigris

Description

By default, tigris uses the rappdirs package to determine a suitable location to store shapefiles on the user's computer. However, it is possible that the user would want to store shapefiles in a custom location. This function allows users to set the cache directory, and stores the result in the user's .Renviron so that tigris will remember the location.

Windows users: please note that you'll need to use double-backslashes or forward slashes when specifying your cache directory's path in R.

Usage

tigris_cache_dir(path)

Arguments

path

The full path to the desired cache directory

Examples

## Not run: 
# Set the cache directory
tigris_cache_dir('PATH TO MY NEW CACHE DIRECTORY')

# Check to see if it has been set correctly
Sys.getenv('TIGRIS_CACHE_DIR')

## End(Not run)

tigris documentation built on May 29, 2024, 2:20 a.m.