scale_by_column: Scale a phyloseq object

View source: R/data_refinement.R

scale_by_columnR Documentation

Scale a phyloseq object

Description

This function scales the abundances in each sample by a constant, making it suitable to transform from relative data to absolute data.

Usage

scale_by_column(object, column)

Arguments

object

A phyloseq object, where the abundances in its OTU table are to be scaled

column

Either a character vector of length 1 with the name of the column in the sample data to scale by or a numeric vector which length is equal to the number of samples.

Value

A phyloseq object where the abundances in the OTU table are scaled

Examples

library(micInt)
library(phyloseq)
data("soilrep")
s <- 1:nsamples(soilrep)
scale_by_column(soilrep, s)

AlmaasLab/micInt documentation built on April 1, 2022, 10:37 a.m.