trans_combine: Merge multiple columns of easynem's meta

View source: R/trans_combine.R

trans_combineR Documentation

Merge multiple columns of easynem's meta

Description

The trans_combine() is used for the special case of merging columns in easynem's meta. For example, Cp35% (the sum of percentages from Cp3 to Cp5) is often used in nematode community analysis. This function can quickly merge Cp3 to Cp5.

Usage

trans_combine(data, col)

Arguments

data

An easynem-class data.

col

The name of the column to be summed.

Details

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

nem_trans <- nem |> trans_combine(c("3", "4", "5"))

Value

An easynem-class data.

See Also

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

Examples

nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_trans <- nem |>
             trans_name(cp_value) |>
             trans_norm(method = percent) |>
             trans_combine(c("3", "4", "5"))
show(nem_trans)
nem_trans@meta$`3_4_5`

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