subset.asb: subset.asb

View source: R/as_data_frame_asb.R

subset.asbR Documentation

subset.asb

Description

summary method for class asb. \Sexpr[results=rd, stage=render]{ lifecycle::badge("experimental") }

Usage

## S3 method for class 'asb'
subset(x, ..., taxa = NULL, exclude = NULL)

Arguments

x

Results of function as_biomonitor().

...

Rurther arguments to be passed to or from other methods.

taxa

A taxon or a vector of taxa to retain.

exclude

A taxon or a vector of taxa to exclude. For example, this option is useful to exclude alien taxa.

Examples

data(macro_ex)
data_bio <- as_biomonitor(macro_ex)

# select EPT Taxa (Ephemeroptera, Plecoptera and Trichoptera)

subset(data_bio, taxa = c("Ephemeroptera", "Plecoptera", "Trichoptera"))

# select Trichoptera excluding the trichopteran family Hydropsychidae

tricho <- subset(data_bio, taxa = "Trichoptera", exclude = "Hydropsychidae")
tricho_agg <- aggregate_taxa(tricho)

# exclude Chironomidae
subset(data_bio, exclude = "Chironomidae")

alexology/biomonitoR documentation built on Oct. 10, 2024, 12:02 a.m.