filter_name: 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, ...)
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.
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")
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