Learn R Programming

forestChange (version 1.0)

getGADM: Get Geographic Adminitrative Unit

Description

This function is a wrapper of getData used to import levels in Geographic Administrative Units (GADM).

Usage

getGADM(unit.nm = NULL, level = 2, country = "COL")

Arguments

unit.nm

character or NULL. Name of an administrative unit (e.g. municipality), or the name of such a name plus its corresponding higher-level unit (e.g. department/state). If NULL then a list of unit names is printed.

level

numeric. A number between zero and two, indicating any of the levels of administrative subdivisions in GADM: 0=country, 1=first level of subdivision, and 2=second level of subdivision).

country

character. ISO code specifying a country. Default 'COL'

Value

SpatialPolygonsDataFrame or character vector of GADM units..

References

https://gadm.org/

Examples

Run this code
# NOT RUN {
## Printing municipalities of Colombia:    
 
# }
# NOT RUN {
     muni <- getGADM()
     head(muni)
 
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab