Learn R Programming

Rnightlights (version 0.1.2)

ctryShpLyrName2Num: Get the integer number of the layer. topmost country layer=0

Description

Get the integer number of the layer. Is the last character in the name and is a digit. E.g. for the 3rd layer in Kenya shapefile polygon named "KEN_adm3" the layer number is "3"

Usage

ctryShpLyrName2Num(layerName)

Arguments

layerName

- the name of the polygon layer

Value

Integer layer number

Examples

Run this code
# NOT RUN {
ctryShpLyrName2Num("KEN_adm1")
# }
# NOT RUN {
  #returns 1

# }

Run the code above in your browser using DataLab