View source: R/sampNoDeMArrayLM.R
| sampNoDeMArrayLM | R Documentation |
When multiple series of data are tested simultaneaously (eg using moderTestXgrp), multiple pairwise comparisons get performed.
This function helps locating the groups of samples, eg respective mean-columns, corresponding to specific pairwise comparisons.
sampNoDeMArrayLM(
MArrayObj,
useComp = NULL,
outTy = "index",
groupSep = NULL,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
MArrayObj |
(list or MArray-object) main input |
useComp |
(character or integer) index or name of pairwise-comparison to be addressed |
outTy |
(character) choose if just vector of indexes or list with $ind (with |
groupSep |
(NULL or character of length=1) separator for pair of names; if |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
As main input one gives a list or MArrayLM-object containing testing results from pairwise comparisons,
and specific comparisons indicated by useComp to get located in the elements of mean-columns (lstMeans).
This function returns a numeric vector (length=2) with index indicating the columns of (replicate) mean-values corresponding to the comparison specified in useComp
moderTestXgrp, this function gets used eg in MAplotW or VolcanoPlotW
grp3 <- factor(rep(LETTERS[4:2], c(2,3,3)))
set.seed(2017); t8 <- matrix(round(rnorm(208*8,10,0.4), 2), ncol=8,
dimnames=list(paste(letters[],rep(1:8,each=26),sep=""), paste0(grp3,c(1:2,1:3,1:3))))
if(requireNamespace("limma", quietly=TRUE)) { # need limma installed...
test8 <- moderTestXgrp(t8, grp3)
head(test8$p.value) # all pairwise comparisons available
sampNoDeMArrayLM(test8, 1)
unique(grp3)[sampNoDeMArrayLM(test8, 1)]
head(test8$means[,sampNoDeMArrayLM(test8, 1)])
head(test8$means[,sampNoDeMArrayLM(test8, "C-D")]) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.