chooseTaxa | R Documentation |
Select taxa (variables) from an object on the basis of one or both of maximum abundance and number of occurrences greater than user-specified values. This is a simple utility function to encapsulate this common task in filtering palaeoecological data sets.
chooseTaxa(object, ...)
## Default S3 method:
chooseTaxa(object, n.occ = 1, max.abun = 0,
type = c("AND","OR"), value = TRUE, na.rm = FALSE,
...)
object |
an R object for which a suitable method exists. The default method assumes a matrix-like object such as a data frame or a numeric matrix. |
n.occ |
numeric; number of occurrences representing the lower
limit for selection. A taxon is included in the returned subset if
it is present a total of |
max.abun |
numeric; maximum abundance representing the lower
limit for selection. A taxon is included in the returned subset if
it attains abundance equal to or greater than |
type |
character; one of |
value |
logical; should the data for the selected taxa be
returned? If |
na.rm |
logical; should missing values |
... |
arguments passed on to subsequent methods. |
If value = TRUE
, returns the supplied data frame or matrix
with a subset of columns (taxa) that meet the criteria chosen. If
value = FALSE
, a logical vector is returned.
Gavin L. Simpson
data(ImbrieKipp)
IK2 <- chooseTaxa(ImbrieKipp, n.occ = 5)
dim(ImbrieKipp)
dim(IK2)
## return a logical vector to select species/columns
chooseTaxa(ImbrieKipp, n.occ = 5, value = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.