subset: Subset Method for taxlist Objects

Description Usage Arguments Details Value Author(s) Examples

Description

Subset of taxlist objects will be done applying either logical operations or pattern matchings. Subsets can be referred to information contained either in the slot 'taxonNames', 'taxonRelations' or 'taxonTraits'.

Usage

1
2
3
## S4 method for signature 'taxlist'
subset(x, subset, slot="names", keep_children=FALSE,
	keep_parents=FALSE, ...)

Arguments

x

Object of class taxlist.

subset

Logical vector or logical operation to apply as subset.

slot

Character value indicating the slot to be used for the subset.

keep_children

Logical value applied to hierarchical structures.

keep_parents

Logical value applied to hierarchical structures.

...

Further arguments to be passed to or from other methods.

Details

The argument 'subset' will be applied to the slot specified in argument 'slot'. This argument also allows partial matchings.

Arguments keep_children and keep_parents are applied to objects including parent-child relationships. When those arguments are set as FALSE (the default), children or parents of selected taxon concepts will not be included in the subset.

Be aware that subset won't work properly inside of function definitions.

Value

An object of class taxlist.

Author(s)

Miguel Alvarez, [email protected].

Examples

1
2
3
4
5
6
7
library(taxlist)

data(Easplist)
Easplist <- subset(Easplist, lf_behn_2018 == "reed_plant", slot="traits")
summary(Easplist)

summary(as.factor(Easplist$lf_behn_2018))

taxlist documentation built on July 2, 2018, 1:03 a.m.