Removes or flags records with equal minimum and maximum age.
cf_equal(
x,
min_age = "min_ma",
max_age = "max_ma",
value = "clean",
verbose = TRUE
)
data.frame. Containing fossil records with taxon names, ages, and geographic coordinates.
character string. The column with the minimum age. Default = “min_ma”.
character string. The column with the maximum age. Default = “max_ma”.
character string. Defining the output value. See value.
logical. If TRUE reports the name of the test and the number of records flagged.
Depending on the ‘value’ argument, either a data.frame
containing the records considered correct by the test (“clean”) or a logical vector (“flagged”), with TRUE = test passed and FALSE = test failed/potentially problematic . Default = “clean”.
See https://ropensci.github.io/CoordinateCleaner/ for more details and tutorials.
Other fossils:
cf_age()
,
cf_outl()
,
cf_range()
,
write_pyrate()
minages <- runif(n = 10, min = 0.1, max = 25)
x <- data.frame(species = letters[1:10],
min_ma = minages,
max_ma = minages + runif(n = 10, min = 0, max = 10))
x <- rbind(x, data.frame(species = "z",
min_ma = 5,
max_ma = 5))
cf_equal(x, value = "flagged")
#> Testing age validity
#> Flagged 1 records.
#> [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE