corColumnOrder {wrProteo}R Documentation

Order Columns in list of matrixes

Description

This function orders columns in list of matrixes (or matrix) according to argument sampNames. This function can be used to adjust/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.

Usage

corColumnOrder(
  dat,
  replNames = NULL,
  sampNames,
  useListElem = c("quant", "raw", "counts"),
  annotElem = "sampleSetup",
  newNames = NULL,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Arguments

dat

(matrix, list or MArrayLM-object from limma) main input of which columns should get re-ordered, may be output from moderTestXgrp or moderTest2grp.

replNames

(character) new column-names (in order as input from dat), allows renaming colnames before defining new order

sampNames

(character) column-names in desired order for output (must match colnames of dat or replNames, if used)

useListElem

(character) in case dat is list, all list-elements who's columns should get (re-)ordered

annotElem

(character) name of list-element of dat with annotation data to get in new order

newNames

depreciated, plese use replNames instead

silent

(logical) suppress messages

debug

(logical) display additional messages for debugging

callFrom

(character) allow easier tracking of message(s) produced

Value

This function returns an object of same class as input dat (ie matrix, list or MArrayLM-object from limma)

See Also

moderTestXgrp for single comparisons; order

Examples

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])

[Package wrProteo version 1.11.0.1 Index]