disambiguate_lga: Disambiguate Synonymous States and LGAs

View source: R/disambi.R

disambiguate_lgaR 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 lgas of length 1L.

state

The name of the State to which the LGA is to belong to.

...

Arguments to be passed to menu.

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")

if (interactive())
  map_ng(obi.benue)


BroVic/naijR documentation built on Oct. 15, 2024, 8:38 p.m.