gadm_subset: Extract regions

Description Usage Arguments Value Note Author(s) See Also Examples

Description

With subset you can extract one or more regions from a country at the current level.

Usage

1
2
3
   gadm_subset(x, level = NULL, regions = NULL, usevar = NULL)

   gadm.subset(x, level = NULL, regions = NULL, usevar = NULL) # deprecated

Arguments

x

Object gadm_sf or gadm_sp

level

Integer the level at which the regions are extracted from

regions

character vector of named regions

usevar

character name of an other var of the internal dataset of map

Value

Object As input object, gadm_sf or gadm_sp

Note

gadm.subset() is deprecated, it will be removed in the next release. Please use gadm_subset()

Author(s)

Jean Pierre Decorps <jp.decorps@epiconcept.fr>

See Also

listNames

Examples

1
2
3
4
5
library(GADMTools)
data("Corsica")

Calvi <- gadm_subset(Corsica, 4, "Calvi")
plotmap(Calvi)

IamKDO/GADMTools documentation built on Aug. 23, 2021, 5:14 a.m.