Learn R Programming

Rnightlights (version 0.2.4)

getCtryStructAdmLevelNames: Get the list of admin level names from a ctryStruct file

Description

Get the list of admin level names from a ctryStruct file created from the polygon for speed. It returns: all official names starting from 1 to the specified lowestAdmLevel. If not lowestAdmLevel is not specified, all admin level names are returned

Usage

getCtryStructAdmLevelNames(ctryCode = NULL, lowestAdmLevel,
  gadmVersion = pkgOptions("gadmVersion"),
  gadmPolyType = pkgOptions("gadmPolyType"), custPolyPath = NULL)

Arguments

ctryCode

character The ctryCode of the country of interest

lowestAdmLevel

integer The lowest admin level number to return

gadmVersion

The GADM version to use

gadmPolyType

The format of polygons to download from GADM

custPolyPath

Alternative to GADM. A path to a custom shapefile zip

Value

character vector of admin level names

Examples

Run this code
# NOT RUN {
Rnightlights:::getCtryStructAdmLevelNames("KEN")
#returns vector [1] "County"       "Constituency" "Ward"
#if KEN shapefile exists otherwise errors
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab