validate_geocode {photobiology} | R Documentation |
Validate a geocode
Description
Test validity of a geocode or ensure that a geocode is valid.
Usage
validate_geocode(geocode)
is_valid_geocode(geocode)
length_geocode(geocode)
na_geocode()
Arguments
geocode |
data.frame with geocode data in columns |
Details
validate_geocode
Converts to tibble, checks data bounds, converts
address to character if it is not already a character vector, or add
character NAs if the address column is missing.
is_valid_geocode
Checks if a geocode is valid, returning 0L if not,
and the number of row otherwise.
Value
A valid geocode stored in a tibble.
FALSE for invalid, TRUE for valid.
FALSE for invalid, number of rows for valid.
A geo_code tibble with all fields set to suitable NAs.
Examples
validate_geocode(NA)
validate_geocode(data.frame(lon = -25, lat = 66))
is_valid_geocode(NA)
is_valid_geocode(1L)
is_valid_geocode(data.frame(lon = -25, lat = 66))
na_geocode()
[Package photobiology version 0.11.2 Index]