Learn R Programming

CoordinateCleaner (version 1.0-7)

tc_equal: Flag Fossils with equal min and max age

Description

Flags records of fossil with equal minimum and maximum age.

Usage

tc_equal(x, min.age = "min_ma", max.age = "max_ma", 
         value = "clean", verbose = TRUE)

Arguments

x

a data.frame. Containing geographical coordinates and species names.

min.age

a character string. The column with the minimum age. Default = “min_ma”.

max.age

a character string. The column with the maximum age. Default = “max_ma”.

value

a character string. Defining the output value. See value.

verbose

logical. If TRUE reports the name of the test and the number of records flagged.

Value

Depending on the ‘value’ argument, either a data.frame containing the records considered correct by the test (“clean”) or a logical vector, with TRUE = test passed and FALSE = test failed/potentially problematic (“flags”). Default = “clean”.

Examples

Run this code
# NOT RUN {
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))
                
tc_equal(x, value = "flags")
# }

Run the code above in your browser using DataLab