Filter for unique elements
This function aims to identify and remove duplicated elements in a list and maintain the list-structure in the output.
filtSizeUniq
filters 'lst' (list of character-vectors or character-vector) for elements being unique (to 'ref' or if NULL to all 'lst') and of character length.
In addition, the min- and max- character length may be filtered, too. Eg, in proteomics this helps removing peptide sequences which would not be measured/detected any way.
filtSizeUniq( lst, ref = NULL, minSize = 6, maxSize = 36, filtUnique = TRUE, byProt = TRUE, inclEmpty = TRUE, silent = FALSE, callFrom = NULL )
lst |
list of character-vectors or character-vector |
ref |
(character) optional alternative 'reference', if not |
minSize |
(integer) minimum number of characters, if |
maxSize |
(integer) maximum number of characters |
filtUnique |
(logical) if |
byProt |
(logical) if |
inclEmpty |
(logical) optional including empty list-elements when all elements have been filtered away - if 'lst' was named list |
silent |
(logical) suppress messages |
callFrom |
(character) allow easier tracking of message(s) produced |
list of filtered input
filtSizeUniq(list(A="a",B=c("b","bb","c"),D=c("dd","d","ddd","c")),filtUn=TRUE,minSi=NULL) # input: c and dd are repeated filtSizeUniq(list(A="a",B=c("b","bb","c"),D=c("dd","d","ddd","c")),ref=c(letters[c(1:26,1:3)], "dd","dd","bb","ddd"),filtUn=TRUE,minSi=NULL) # a,b,c,dd repeated
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.