organizeAsListOfRepl {wrMisc} | R Documentation |
(re)organize data of (3-dim) array as list of replicates
Description
Organize array of all data ('arrIn', long table) into list of (replicate-)arrays (of similar type/layout) based on dimension number 'byDim' of 'arrIn' (eg 2nd or 3rd dim).
Argument inspNChar
defines the number of characters to consider, so if the beginning of names is the same they will be separated as list of multiple arrays.
Default will search for '_' separator or trim from end if not found in the relevant dimnames
Usage
organizeAsListOfRepl(
arrIn,
inspNChar = 0,
byDim = 3,
silent = TRUE,
debug = FALSE,
callFrom = NULL
)
Arguments
arrIn |
(array) main input |
inspNChar |
(interger) if inspNChar=0 the array-names (2nd dim of 'arrIn') will be cut before last '_' |
byDim |
(integer, length=1) dimension number along which data will be split in separate elements (considering the first inspNChar characters) |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
Value
This function returns a list of arrays (typically 1st and 2nd dim for specific genes/objects, 3rd for different measures associated with)
See Also
Examples
arr1 <- array(1:24,dim=c(4,3,2),dimnames=list(c(LETTERS[1:4]),
paste("col",1:3,sep=""), c("ch1","ch2")))
organizeAsListOfRepl(arr1)