Flags records whose longitude or latitude is missing, not a number, or
outside [-180, 180] x [-90, 90]. Text columns are coerced with
as.numeric(as.character()) first. A record failing this test gets no
other spatial flag.
Arguments
- x
A data frame of occurrence records.
- ...
Further arguments to
flag_occurrences():columns,reference,gazetteers,land_scale.
Value
clean_<test>(): the rows of x the test does not flag, with the
columns of x unchanged. See keep_unflagged(), Cleaning functions.
Fields
lon, lat (see occ_columns()).
CoordinateCleaner
Equivalent to cc_val(). Its other spatial
tests return NA or "clean" for invalid rows; here those rows carry only
the invalid bit.
See also
flag_occurrences(), flag_tests()
Other tests:
clean_age_equal(),
clean_age_outlier(),
clean_age_range_outlier(),
clean_aohi(),
clean_basis_fossil(),
clean_capital(),
clean_centroid(),
clean_country_mismatch(),
clean_dataset_ddmm(),
clean_dataset_rounded(),
clean_duplicate(),
clean_equal(),
clean_establishment_introduced(),
clean_gbif_headquarters(),
clean_institution(),
clean_issue_coordinate(),
clean_outlier(),
clean_range(),
clean_sea(),
clean_sea_nonmarine(),
clean_spatiotemporal_outlier(),
clean_urban(),
clean_zero()
Examples
x <- data.frame(decimalLongitude = c("16.37", "abc", NA, "200"),
decimalLatitude = c("48.21", "10", "10", "10"))
flag_occurrences(x, tests = "invalid")$flag_invalid
clean_invalid(x)