Description Usage Arguments Value Author(s) Examples
Power Analysis
1 2 | 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 wenbo@genomics.cn
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.