filter_name: Filter easynem by column name and keep rows that match a...

View source: R/filter_name.R

filter_nameR Documentation

Filter easynem by column name and keep rows that match a condition

Description

The filter_name() is the extension of the filter function for easynem type data, used to subset an easynem object, retaining all rows that satisfy your conditions. This function selects one of tab, tax or meta in easynem for filtering. When any of the three components changes, the related components will also change accordingly. To be retained, the row must produce a value of TRUE for all conditions.

Usage

filter_name(data, target, ...)

Arguments

data

An easynem-class data.

target

tab, tax or meta, where tab represents the species abundance table, tax represents the species classification table, and meta represents the experimental design table.

...

Other parameters of the filter function of the dplyr package.

Details

To facilitate code interpretation, it is recommended to use the pipe symbol |> to connect functions:

nem_filter <- nem |> filter_name(target = meta, season == "Summer")

Value

An easynem-class data. The rows of each component are a subset of the input, but appear in the same order and the columns of each component are not modified.

See Also

Other functions in this package for filtering and transforming data sets: filter_num, trans_formula, trans_formula_v, trans_name, trans_norm, trans_rare, trans_combine

Examples

nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_filter <- nem |> filter_name(target = meta, Treatments == "C4")
show(nem_filter)

easynem documentation built on Nov. 5, 2025, 7:39 p.m.