View source: R/fuseCommonListElem.R
fuseCommonListElem | R Documentation |
fuseCommonListElem
fuses (character or numeric) elements of list re-occuring under same name, so that resultant list has unique names.
Note : will not work with list of matrixes
fuseCommonListElem(
lst,
initOrd = TRUE,
removeDuplicates = FALSE,
callFrom = NULL
)
lst |
(list) main input, list of numeric vectors |
initOrd |
(logical) preserve initial order in output (if TRUE) or otherwise sort alphabetically |
removeDuplicates |
(logical) allow to remove duplicate entries (if vector contains names, both the name and the value need to be identical to be removed; note: all names must have names with more than 0 characters to be considered as names) |
callFrom |
(character) allows easier tracking of message(s) produced |
fused list (same names as elements of input)
unlist
val1 <- 10 +1:26
names(val1) <- letters
lst1 <- list(c=val1[3:6],a=val1[1:3],b=val1[2:3],a=val1[12],c=val1[13])
fuseCommonListElem(lst1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.