singletons {divDyn} | R Documentation |
List of singleton taxa
Description
The function returns lists of taxa that occurr with only one particular entry in a given variable.
Usage
singletons(
dat,
tax = "clgen",
var = NULL,
bin = NULL,
bybin = FALSE,
na.rm = TRUE
)
Arguments
dat |
( |
tax |
( |
var |
( |
bin |
( |
bybin |
( |
na.rm |
( |
Details
Singletons are defined in number of ways in the literature. True singletons are species that are represented by only one specimen, but one can talk about single-occurrence, single-interval, single-reference or single collection taxa as well. These can be returned with this function.
As the time bin has particular importance, it is possible to filter singleton taxa in the context of a single bin. These can be returned with the bybin
argument, that constrains and iterates the filtering to every bin.
If this argument is set to TRUE
and the variable in question is a references, than single-reference taxa will be taxa that occurred in only one reference within each bin - it does not necessarily mean that only one reference describes the taxon in the total database!
Value
A vector of character entries in tax
.
Examples
# load example dataset
data(corals)
# Example 1. single-occurrence taxa
singOcc <- singletons(corals, tax="genus", bin="stg")
# Example 2. output for every bin
singOccBin <- singletons(corals, tax="genus", bin="stg", bybin=TRUE)
# Example 3. single-interval taxa (all)
singInt <- singletons(corals, tax="genus", var="stg")
# Example 4. single interval taxa (for every bin)
singIntBin <- singletons(corals, tax="genus", var="stg", bin="stg", bybin=TRUE)
# Example 5. single reference taxa (total dataset)
singRef <- singletons(corals, tax="genus", var="reference_no")
# Example 6. single reference taxa (see description for differences )
singRefBin <- singletons(corals, tax="genus", var="reference_no", bin="stg", bybin=TRUE)