View source: R/powerAnalysis.R
powerAnalyst | R Documentation |
Power Analysis
powerAnalyst(para, group, valueID = "value", log = TRUE,
maxInd = 1000, fdr = 0.1, showPlot = FALSE)
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 |
An value
Bo Wen wenbostar@gmail.com
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.