subset_regions: Subset Regions

subset_regionsR Documentation

Subset Regions

Description

Function that allows to clip specific country regions from the 'raw' boundary shapefile when requiring analysis at the sub-national level

Usage

subset_regions(mainPath, location, mostRecent = FALSE)

Arguments

mainPath

character; the parent directory of the location folder

location

character; the location folder name

mostRecent

logical; should the most recent boundary shapefile be selected? If FALSE and if there are multiple available inputs, the user is interactively asked to select the input based on file creation time.

Examples

# Replace workDir with the actual path to your working directory
## Not run: 
mainPath <- "workDir"
initiate_project(mainPath)
## End(Not run)

# Replace myLocation with the location name you are working on (workDir subfolder)
## Not run: 
location <- "myLocation"
download_boundaries(mainPath, location, adminLevel = 1, type = "gbOpen", alwaysDownload = TRUE)
subset_regions(mainPath, location, mostRecent = TRUE)
## End(Not run)

ptimoner/inAccMod documentation built on Jan. 27, 2025, 9:34 a.m.