Learn R Programming

Rnightlights (version 0.1.2)

getCtryShpLyrName: Get the standard name of a polygon layer for a country

Description

Get the standard name of a polygon layer for a country. Used to refer to a polygon layer by name. i.e. for CTRYCODE & lyrNum="0": lyrName="CTRYCODE_adm0", lyrNum="1": lyrName="KEN_adm1". Note this #' is different from the country official administration level name.

Usage

getCtryShpLyrName(ctryCode, lyrNum)

Arguments

ctryCode

the ISO3 code for the country

lyrNum

the order of the layer starting from 0 = country level, 1 = first admin level

Value

Character layer name

Examples

Run this code
# NOT RUN {
lyrName <- getCtryShpLyrName("KEN","0") #top layer name
  #returns "KEN_adm0"

#@export only due to exploreData() shiny app
# }

Run the code above in your browser using DataLab