Learn R Programming

Rnightlights (version 0.1.5)

ctryShpLyrName2Num: Get the integer number of the layer.

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. The lowest layer number is 0

Usage

ctryShpLyrName2Num(layerName)

Arguments

layerName

- the name of the polygon layer

Value

Integer layer number

Examples

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

# }

Run the code above in your browser using DataLab