Correct any misspelt names of administrative regions i.e. States and LGAs
fix_region(x, ...)# S3 method for states
fix_region(x, ...)
# S3 method for lgas
fix_region(x, interactive = FALSE, quietly = FALSE, ...)
# S3 method for default
fix_region(x, ...)
An S3 object of class states
or lgas
. For
fix_region.default
, a character vector can be passed but only
that for States will be interpretable.
Arguments passed to methods.
Logical. When TRUE
, the function prompts the user
to interactively select the correct LGA names from a list of available
options.
Logical; default argument is FALSE
.
The transformed object. If all names are correct, the object is returned unchanged.
The function will look through a character vector and try to
determine if State or LGA names have been wrongly entered. This presupposes that
the atomic vector is of type character
. It does not test any missing
values in the vector, leaving them untouched.