cf_equal function

Identify Fossils with equal min and max age

Identify Fossils with equal min and max age

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 )

Arguments

  • x: data.frame. Containing fossil records with taxon names, ages, and geographic coordinates.
  • min_age: character string. The column with the minimum age. Default = min_ma .
  • max_age: character string. The column with the maximum age. Default = max_ma .
  • value: character string. Defining the output value. See value.
  • verbose: logical. If TRUE reports the name of the test and the number of records flagged.

Returns

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 .

Note

See https://ropensci.github.io/CoordinateCleaner/ for more details and tutorials.

Examples

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")

See Also

Other fossils: cf_age(), cf_outl(), cf_range(), write_pyrate()