combineRedundLinesInListAcRef: Combine Redundant Lines In List

View source: R/combineRedundLinesInList.R

combineRedundLinesInListAcRefR Documentation

Combine Redundant Lines In List

Description

This function provides help for combining/summarizing lines of numeric data which may be summaried according to reference vector or matrilst (part of the same input-list). Initial data and reference will be aligned based on rownames and the content of reference (or the column specified by refColNa).

Usage

combineRedundLinesInListAcRef(
  lst,
  listNa = c("ref", "quant"),
  refColNa = "xx",
  summarizeType = "av",
  NA.rm = TRUE,
  silent = FALSE,
  debug = FALSE,
  callFrom = NULL
)

Arguments

lst

(list) main input

listNa

(character) names of list-elements containing quantitation data (1st position) and protein/line annotation (2nd position)

refColNa

(character) in case the list-element to be used as reference is matrix or data.frame, the column to be used must be specified here

summarizeType

(character) the summarization method gets specified here; so far 'sum','av','med','first' and 'last' are implemented

NA.rm

(logical) pass to summarizing functions order to omit NAs, defaults to TRUE

silent

(logical) suppress messages

debug

(logical) additional messages for debugging

callFrom

(character) allow easier tracking of messages produced

Details

The first element of listNa is supposed to be the name of the list-element to be used as reference. Different order of listNa is possible when the vector listNa is named (using 'ref' or 'annot' to specify the reference), see also last example.

The initial list may contain multiple matrixes which will all be summarized by the same procedure as long as they are specified by listNa.

Please note that list elements from input not specified by listNa will be lost, ie given as emty list-elements.

Value

This function returns a list of same length as input

See Also

image

Examples

x1 <- list(quant=matrix(11:34, ncol=3, dimnames=list(letters[8:1], LETTERS[11:13])), 
  annot=matrix(paste0(LETTERS[c(1:4,6,3:5)],LETTERS[c(1:4,6,3:5)]), ncol=1, 
  dimnames=list(paste(letters[1:8]),"xx")) )
combineRedundLinesInListAcRef(lst=x1, listNa=c("annot","quant"), refColNa="xx")
combineRedundLinesInListAcRef(lst=x1, listNa=c(quant="quant",ref="annot"), refColNa="xx")

wrMisc documentation built on Nov. 17, 2023, 5:09 p.m.