pmfanova: pmfanova

View source: R/pmf-anova.R

pmfanovaR Documentation

pmfanova

Description

perform principle compponent analysis on ramclustR object dataset, export plots

Usage

pmfanova(
  ramclustObj = RC,
  anova.name = NULL,
  which.data = "SpecAbund",
  label.by = "cmpd",
  subset = c(""),
  anova.call = NULL,
  posthoc = NULL,
  effectsplots = TRUE,
  delim = "-",
  plots = TRUE,
  pcut = 0.05,
  p.adj = "BH",
  which.quan = NULL,
  filter = TRUE,
  summary.statistics = TRUE,
  output.summary = TRUE,
  remove.na.factors = FALSE
)

Arguments

ramclustObj

ramclustR object to perform ANOVA on

anova.name

character; optionally assign a name to the anova. valuable if you wish to perform more than one ANOVA on a sample set. If NULL, name will be autogenerated from the anova.call and subset information.

which.data

character; which dataset (SpecAbund or SpecAbundAve) to perform PCA on.

label.by

how should metabolites columns be labelled? one of 'ann' or 'cmpd', typically.

subset

character or integer vector; if character, must be even length. If you wish to perform ANOVA only when your factor called 'treatment' is a 'trt' sample and when 'time' is '3', then you would use i.e. c("treatment", "trt", "time", "3"). vector length must always be even, and with 'factor' followed by 'level'. If an integer vector is provided, only row numbers matching those integers are retained.

anova.call

character; the model you wish to run. i.e. "Trt * Time" or "Trt * Time + (1|Block)"

posthoc

character; if you wish to perform post hoc testing, define the posthoc test to use. i.e. if anova.call is "Trt * Time" you can use "Trt|Time" to specific 'treatment within time' comparisons.

effectsplots

logical; if TRUE, plot effect plots in pdf format. If plotting fails, can set to 'FALSE' to get tabular results only.

delim

character; what is the character delimiting factors in the sample names. generally '-'

plots

logical; if plotting is any issue set this to FALSE.

pcut

numeric; what is the pvalue cutoff for determining significance? Used only for plotting.

p.adj

character; what p.adjust method should be used. generally 'fdr' or 'bh' (equivalent). see ?p.adjust

filter

logical, TRUE by default. when $cmpd.use slot is present (from rc.cmpd.filter.cv function), only cmpds that passed cv filtering are used. If you wish to change that behavior, rerun the rc.cmpd.filter.cv function with a really high CV threshold.

summary.statistics

logical, TRUE by default. If true, calculate mean and standard deviation for each level as defined by the anova.call model.

output.summary

logical, TRUE by default. If true, saves full model results for all ANOVA as .Rdata file, and exports all summaries to a .txt file.

which.quan;

chracter vector. which factors should be interpreted as quantitative? i.e. c("time", "dose")

Details

This function performs standard or mixed model anova using a ramclusR object as input

Value

returns a ramclustR object. new R object in $pca slot. Optionally, new R object in $AuerGervini slot if npc = "auto".

Author(s)

Corey Broeckling


cbroeckl/csu.pmf.tools documentation built on Jan. 26, 2024, 6:27 p.m.