View source: R/filterLiColDeList.R
filterLiColDeList | R Documentation |
Filter all elements of list (or S3-object) according to criteria designed to one selected reference-element of the list. All simple vectors, matrix, data.frames and 3-dimensional arrays will be checked if matching number of rows and/or columns to decide if they should be filtered the same way. If the reference element has same number of rows and columns simple (1-dimensional) vectors won't be filtered since it not clear if this should be done to lines or columns.
filterLiColDeList(
lst,
useLines,
useCols = NULL,
ref = 1,
silent = FALSE,
callFrom = NULL,
debug = FALSE
)
lst |
(list or S3 object) main input |
useLines |
(integer, logcial or character) vector to assign lines to keep when filtering along lines;
set to |
useCols |
(integer, logcial or character) vector for filtering columns; set to |
ref |
(integer) index for designing the elment of 'lst' to take as reference for checking which other list-elements have suitable number of rows or columns |
silent |
(logical) suppress messages |
callFrom |
(character) allow easier tracking of messages produced |
debug |
(logical) additional messages for debugging |
This function is used eg in package wrProteo to simultaneaously filter raw and transformed data.
This function returns the correct(ed) input (object of same class, of same length)
moderTest2grp
for single comparisons, lmFit
lst1 <- list(m1=matrix(11:18,ncol=2), m2=matrix(21:30,ncol=2), indR=31:34,
m3=matrix(c(21:23,NA,25:27,NA),ncol=2))
## here $m2 has more lines than $m1, and thus will be ignored when ref=1
filterLiColDeList(lst1, useLines=2:3)
filterLiColDeList(lst1, useLines="allNA", ref=4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.