Learn R Programming

PTXQC (version 1.0.4)

getAbundanceClass: Assign a relative abundance class to a set of (log10) abundance values

Description

Abundances (should be logged already) are grouped into different levels, starting from the smallest values ("low") to the highest values ("high"). Intermediate abundances are either assigned as "mid", or "low-mid". If the range is too large, only "low" and "high" are assigned, the intermediate values are just numbers.

Usage

getAbundanceClass(x)

Arguments

x

Vector of numeric values (in log10)

Value

Vector of factors corresponding to input with abundance class names (e.g. low, high)

Details

Example: getAbundanceClass(c(12.4, 17.1, 14.9, 12.3)) ## --> factor(c("low", "high", "mid", "low"))