Learn R Programming

GADMTools (version 3.9-1)

listNames: List the region names for a specific administrative level

Description

Returns a list of the names associated with the particular administration level.

Usage

listNames(x, level = 0)

Arguments

x

Object - gadm_sf or gadm_sp

level

Integer - the value of the administration level to list. Attention: only the administrative levels that have been loaded in the loadCountries object can be listed. Names are given in the country's language or English.

Value

Character vector of names

Details

Some GADM country maps provide five or more administrative levels.

Examples

Run this code
# NOT RUN {
library(GADMTools)
data("Corsica")
listNames(Corsica, level=3)
listNames(Corsica, level=4)
# }

Run the code above in your browser using DataLab