Learn R Programming

rangemap (version 0.1.18)

GADM_spoly: Get SpatialPolygons of countries at distinct administrative levels

Description

Get SpatialPolygons of countries at distinct administrative levels

Usage

GADM_spoly(country_code, boundary_level, keep_data = FALSE)

Arguments

country_code

(character) code of country or countries of interest.

boundary_level

(numeric) level of administrative division to be considered.

keep_data

(logical) whether or not to keep downloaded files. Default = FALSE.

Value

A SpatialPolygonsDataFrame from the GADM database at the level selected. If an error occurs when downloading any of the spatial objects based on country_code, the result is NULL.

Examples

Run this code
# NOT RUN {
map_gadm <- GADM_spoly(country_code = "UY", boundary_level = 0)
# }

Run the code above in your browser using DataLab