Learn R Programming

easynem (version 1.0.3)

trans_rare: Randomly rarefied OTU or ASV tables of nematodes for amplicon sequencing data

Description

The trans_rare() is an extension of the rrarefy function of the vegan package for easynem-class data, which is used to randomly rarefied OTU or ASV tables of nematodes for amplicon sequencing data. The default is to rare according to the minimum abundance of nematode in each treatment.

Usage

trans_rare(data, sample = 0, ...)

Value

A rarefied easynem-class data.

Arguments

data

An easynem-class data.

sample

Subsample size for rarefying community. The default sample = 0, the minimum abundance is used for rarefied OTU or ASV tables of nematodes.

...

Other parameters of the rrarefy function of the vegan package.

Details

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

nem_trans <- nem |> trans_rare(1500)

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_combine

Examples

Run this code
nem <- read_nem2(tab = nemtab, tax = nemtax, meta = nemmeta)
nem_trans <- nem |> trans_rare()
colSums(nem_trans@tab[,-1])
nem_trans <- nem |> trans_rare(1500)
colSums(nem_trans@tab[,-1])

Run the code above in your browser using DataLab