powerAnalyst: Power Analysis

Description Usage Arguments Value Author(s) Examples

Description

Power Analysis

Usage

1
2
powerAnalyst(para, group, valueID = "value", log = TRUE, maxInd = 1000,
  fdr = 0.1, showPlot = FALSE)

Arguments

para

An metaXpara object

group

A vector of sample names

valueID

The column name used

log

A logical indicating whether transform the data with log2

maxInd

max sample number

fdr

The FDR threshold

showPlot

Whether or not to print the figure to screen

Value

An value

Author(s)

Bo Wen wenbo@genomics.cn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run:  
library(reshape2)
library(dplyr)
a <- read.csv("http://www.metaboanalyst.ca/MetaboAnalyst/resources/data/power_example.csv")
peaksData <- melt(a,id.vars = c("Diet","Sample"),
    value.name = "value",variable.name = "ID")
peaksData <- dplyr::rename(peaksData,class=Diet,sample=Sample)
para <- new("metaXpara")
peaksData(para) <- peaksData
para <- missingValueImpute(para)
para <- metaX::normalize(para)
para <- transformation(para,valueID = "value")
para <- preProcess(para,scale = "pareto",valueID="value")
powerAnalyst(para,group=c("case","control"),log=FALSE,maxInd=200)

## End(Not run)

metaX documentation built on Oct. 5, 2016, 4:41 a.m.

Related to powerAnalyst in metaX...