| filterList | R Documentation |
This function aims to apply a given filter-citerium, a matrix or vector of FALSE/TRUE which is typically combined with a second layer
which filters for a min content of filer-passing values per line for the first/main criterium.
Then all lines concerned will be removed. This will be done for all list-elements (of appropriate size) of the input-list
(while maintaining the list-structure in the output) not matching the filtering criteria.
filterList(
lst,
filt,
minLineRatio = 0.5,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
lst |
(list) main input, each vector, matrix or data.frame in this list will be filtered if its length or number of lines fits to |
filt |
(logical) vector of |
minLineRatio |
(numeric) in case |
silent |
(logical) suppress messages |
debug |
(logical) display additional messages for debugging |
callFrom |
(character) allow easier tracking of messages produced |
This function returns a filtered list
correctToUnique, unique, duplicated, extrColsDeX
set.seed(2020); dat1 <- round(runif(80),2)
list1 <- list(m1=matrix(dat1[1:40],ncol=8), m2=matrix(dat1[41:80],ncol=8), other=letters[1:8])
rownames(list1$m1) <- rownames(list1$m2) <- paste0("line",1:5)
filterList(list1, list1$m1[,1] >0.4)
filterList(list1, list1$m1 >0.4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.