| reptCompare | R Documentation |
This function compares a list of species (x) with another list (y), typically from the Reptile Database (RDB).
If y is not provided, it defaults to using the internal object allReptiles, extracted from RDB (version: May, 2025).
The function returns species from xthat are either unmatched ("review") or matched with y or with allReptiles, if y is NULL.
If y is provided and any species from x is a valid name according to RDB but is absent from y, it receives the status absent
reptCompare(x = NULL, y = NULL, filter = NULL, compareDataset = FALSE)
x |
A character vector or a data frame containing a column named |
y |
Optional. A character vector or a data frame containing a column named |
filter |
Optional. A character string or a vector of characters.
If |
compareDataset |
Logical. If TRUE, assumes all input names are up-to-date and compares the input list with the reference database to identify any missing species. |
A character vector (if filter is "review", "matched" or "absent), or a data frame with columns:
Species names from x
Comparison result: "review", "matched" or "absent"
If compareDataset = TRUE, then the function returns a vector of species from y that is absent from x.
my_species <- data.frame(species = c("Boa constrictor", "Pantherophis guttatus", "Fake species"))
reptCompare(my_species)
reptCompare(my_species, filter = "review")
reptCompare(my_species, filter = "matched")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.