disambiguate_lga {naijR} | R Documentation |
Disambiguate Synonymous States and LGAs
Description
Some LGAs in Nigeria bear the name of the States to which they belong to. This function will apply an attribute to such an LGA to distinguish it from its State.
Usage
disambiguate_lga(lga, state = NULL, ...)
Arguments
lga |
An object of class |
state |
The name of the State to which the LGA is to belong to. |
... |
Arguments to be passed to |
Details
For state
, if it is not provided by the user, an interactive
prompt will be presented to the user to select the appropriate state - but
only in interactive sessions; if run as a batch command, this function
will signal an error.
Value
The object of class lgas
with the (possibly) modified
State
attribute.
Examples
obi.lga <- lgas("Obi") # Warning
try(map_ng(obi.lga)) # Error
obi.benue <- disambiguate_lga(obi.lga, "Benue")
map_ng(obi.benue)
[Package naijR version 0.6.0 Index]