Flags records outside the Natural Earth land polygons, by a planar
point-in-polygon test in longitude and latitude through a grid index that
resolves boundary cells exactly. The land layer is chosen with
land_scale: 110 (default), 50, or 10. The 1:10 million layer is downloaded once
by download_reference().
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.
CoordinateCleaner
Equivalent to cc_sea() with its default
scale = 110 (clean_coordinates() uses seas_scale = 50, which is
land_scale = 50 here); identical flags on
the same layer. CoordinateCleaner downloads the layer through
rnaturalearth at run time; here it is bundled and pinned.
Custom gazetteer
gazetteers = list(sea = polygons), an sf or
sfc object of land polygons; see flag_occurrences().
See also
flag_occurrences(), flag_tests(), reference_info()
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_invalid(),
clean_issue_coordinate(),
clean_outlier(),
clean_range(),
clean_sea_nonmarine(),
clean_spatiotemporal_outlier(),
clean_urban(),
clean_zero()
Examples
x <- data.frame(decimalLongitude = c(12.58, 16.37, -30), decimalLatitude = c(55.67, 48.21, 40))
flag_occurrences(x, tests = "sea")$flag_sea
flag_occurrences(x, tests = "sea", land_scale = 50)$flag_sea
clean_sea(x, land_scale = 50)