View source: R/utils_helpers.R
num_to_admin | R Documentation |
This function converts a numerical administrative level into its corresponding string format.
num_to_admin(num)
num |
A single integer representing the administrative level. The value 0 corresponds to "National", while positive integers correspond to "Admin-X". |
A character string representing the administrative level: - 0 is converted to "National". - Positive integers are converted to "Admin-X". - Returns NULL if the input is invalid.
num_to_admin(0) # Returns "National"
num_to_admin(1) # Returns "Admin-1"
num_to_admin(2) # Returns "Admin-2"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.