addBatchMeans: A function to append batch specific mean metabolite...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/addBatchMeans.R

Description

This function appends batch specific mean metabolite abundances to data frames containing raw values.

Usage

1
addBatchMeans(metab.col, batch.col, in.data, sample.type.name, analytical.type.name, color.col=NULL)

Arguments

metab.col

A character value indicating the name of the variable in the input data set that corresponds to metabolite abundance.

batch.col

A character value indicating the name of the variable in the input data sets that corresponds to batch. If not specified, this argument defaults to "Batch".

in.data

A data frame containing the variables specified in metab.col, batch.col, and color.col.

sample.type.name

A character value indicating the type of sample: "Quality Control" or "Experimental".

analytical.type.name

A character value indicating whether the data have been normalized. Either "Before Normalization" or "After Normalization".

color.col

A character value indicating the name of the variable in the input data set corresponding to a grouping variable (for instance mom vs. baby samples).

Details

This function adds rows reporting batch specific mean metabolite abundances to data frames of raw values. This is not meant to be a stand alone function but rather work as a part of function metabplot.

Value

Returns a dataframe.

Author(s)

Michael Nodzenski

References

Nodzenski M, Muehlbauer MJ, Bain JR, Reisetter AC, Lowe WL Jr, Scholtens DM. Metabomxtr: an R package for mixture-model analysis of non-targeted metabolomics data. Bioinformatics. 2014 Nov 15;30(22):3287-8.

Examples

1
2
3
4
data(euMetabCData)
euMetabCData$outlier<-FALSE
cdata.with.batch.means<-addBatchMeans("pyruvic_acid", "batch", euMetabCData, sample.type.name="Quality Control", analytical.type.name="Before Normalization", color.col="pheno")
              

metabomxtr documentation built on May 2, 2018, 2:41 a.m.