Order columns in list of matrixes (or matrix)
This function orders columns in list of matrixes (or matrix) according to argument sampNames
.
This function can be used to adjut/correct the order of samples after reading data using readMaxQuantFile()
, readPDExport()
etc.
The input may also be MArrayLM-type object from package limma or from moderTestXgrp
or moderTest2grp
.
corColumnOrder( dat, sampNames, useListElem = c("quant", "raw"), silent = FALSE, callFrom = NULL )
dat |
(matrix, list or MArrayLM-object from limma) main input of which columns should get re-ordered, may be output from |
sampNames |
(character) column-names in desired order for output |
useListElem |
(character) in case |
silent |
(logical) suppress messages |
callFrom |
(character) allow easier tracking of message(s) produced |
object of same class as input dat
moderTestXgrp
for single comparisons, order
grp <- factor(rep(LETTERS[c(3,1,4)], c(2,3,3))) dat1 <- matrix(1:15, ncol=5, dimnames=list(NULL,c("D","A","C","E","B"))) corColumnOrder(dat1,sampNames=LETTERS[1:5]) dat1 <- list(quant=dat1,raw=dat1) dat1 corColumnOrder(dat1,sampNames=LETTERS[1:5])
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.