GADMTools (version 3.7-1)

strippedExists: Test if a stripped gadm_sp object exists

Description

Test if a stripped gadm_sp object exists on the file system in the directory 'basefile'

Usage

strippedExists(name, level, basefile = './')

Arguments

name

Character vector of a named region. An ISO-3166-1 code or a custom name. You don't have to specify the suffix (admX) nor the file extension (.rds).

level

Integer the level of the administrative boundaries (0 is the country, higher values equal finer divisions)

basefile

Character vector the path of the directory where shapefiles are stored. Default is "./"

Value

Boolean TRUE if the file exists, FALSE if not

References

----

See Also

----

Examples

Run this code
# NOT RUN {
# library(GADMTools)
# library(sp)
# if (strippedExists('BEL', level = 2) {
#   BE <- gadm_loadStripped("BEL", level=2)
# }
# }

Run the code above in your browser using DataCamp Workspace