filter_num: Filter easynem's tab by discovery rate or abundance

View source: R/filter_num.R

filter_numR Documentation

Filter easynem's tab by discovery rate or abundance

Description

The filter_num() is used to filter the rows of the easynem tab by abundance or discovery rate. If num>1, filter by abundance, num is the lowest abundance of the tab; if num<1, filter by discovery rate, num is the lowest discovery rate of the tab.

Usage

filter_num(data, num)

Arguments

data

An easynem-class data.

num

Filter threshold value. If num>1, filter by abundance, num is the lowest abundance of the tab; if num<1, filter by discovery rate, num is the lowest discovery rate of the tab.

Details

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

nem_filter <- nem |> filter_num(target = meta, num = 0.85)
nem_filter <- nem |> filter_num(target = meta, num = 500)

Value

An easynem-class data.The results of tab, tax, and meta are the retention values after filtering the tab by abundance or discovery rate.

See Also

Other functions in this package for filtering and transforming data sets: filter_name, 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_num(num = 0.9)
show(nem_filter)
nem_filter <- nem |> filter_num(num = 1000)
show(nem_filter)

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