chooseTaxa: Select taxa (variables) on basis of maximum abundance attained
and number of occurrences
Description
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.Usage
chooseTaxa(object, ...)## S3 method for class 'default':
chooseTaxa(object, n.occ = 1, max.abun = 0,
type = c("AND","OR"), ...)
Arguments
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 n.occ
times or more. See argument
type
for a modifier which might exclu
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 max.abun
in one
or more sample. See argument type
for
type
character; one of "AND"
or "OR"
, controlling
how the criteria n.occ
and max.abun
are combined to
generate a subset of the variables in object
.
...
arguments passed on to subsequent methods.
Value
- Returns the supplied data frame or matrix with a subset of columns
(taxa) that meet the criteria chosen.
Examples
Run this codedata(ImbrieKipp)
IK2 <- chooseTaxa(ImbrieKipp, n.occ = 5)
dim(ImbrieKipp)
dim(IK2)
Run the code above in your browser using DataLab