Skip to contents

Flags records whose minimum age is equal to or greater than their maximum age: a zero-length or inverted stratigraphic range, which in the Paleobiology Database usually means one age was copied into both fields or the two were swapped. Records with a missing age are not flagged.

Usage

clean_age_equal(x, ...)

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.

Details

The width of the range (max_age - min_age) is a numeric field, not a test: it stays a raw column and is cut at tally time with bins, as the record year is.

Fields

min_age, max_age (min_ma, max_ma by default; see occ_columns()).

CoordinateCleaner

Equivalent to cf_equal(); identical flags. cf_range(method = "time") is a threshold on the range width, here a bin in tally_flags(). The per-taxon tests cf_age(), cf_outl() and cf_range() with method = "quantile" or "mad" are test_age_outlier, test_spatiotemporal_outlier and test_age_range_outlier.

Examples

x <- data.frame(min_ma = c(10, 20, 30), max_ma = c(20, 20, 25))
flag_occurrences(x, tests = "age_equal")$flag_age_equal
clean_age_equal(x)