Flags fossil records whose age range (max_age - min_age) lies above the
upper fence of the ranges of the other records of their taxon (Q75 +
mltpl x IQR, or median + mltpl x MAD). A record dated only to a long
period among records dated to stages is the typical case. With level = "all" the fence is taken over the whole input instead of per taxon, as in
CoordinateCleaner's dataset-level cf_range(taxon = ""). A fixed limit in
million years needs no test: the range stays a raw column and is cut in
tally_flags().
Usage
clean_age_range_outlier(
x,
method = "quantile",
mltpl = 5,
size_thresh = 7,
uniq_loc = FALSE,
level = "taxon",
...
)Arguments
- x
A data frame of occurrence records.
- method, mltpl, size_thresh, uniq_loc, level
Options of the test, as in Settings; the defaults are in the usage line.
- ...
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.
Settings
settings = list(age_range_outlier = list(...)) with
method ("quantile"), mltpl (5), size_thresh (7), uniq_loc
(FALSE) and level ("taxon").
CoordinateCleaner
Equivalent to cf_range() with method = "quantile" or "mad"; identical flags. With uniq_loc = TRUE,
CoordinateCleaner also flags records of other taxa that happen to share a
flagged range width; here the flag goes to the records with the same
taxon, coordinates and ages.
See also
flag_occurrences(), flag_tests(), test_age_equal
Other tests:
clean_age_equal(),
clean_age_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(),
clean_sea_nonmarine(),
clean_spatiotemporal_outlier(),
clean_urban(),
clean_zero()
Examples
x <- data.frame(accepted_name = "A", min_ma = 20, max_ma = c(rep(21, 20), 60))
flag_occurrences(x, tests = "age_range_outlier",
columns = occ_columns(species = "accepted_name"))$flag_age_range_outlier
clean_age_range_outlier(x, columns = occ_columns(species = "accepted_name"))