View source: R/AnnotationFuncs.R
mapLists | R Documentation |
Combines two lists, A
and B
, such that names(A)
are preserved, mapping to the
values of B
, using names(B)
as look up. Ie. replaces values in A
with values
in B
, using names(B)
as look up for values in A
.
Once more? See examples.
NB! None-mapped entries are returned as NA, but can be removed using removeNAs
.
mapLists(A, B, removeNAs = TRUE)
A |
List, elements are coerced to character for mapping to B. |
B |
List. |
removeNAs |
Boolean, whether to remove the |
List.
Stefan McKinnon Edwards stefan.hoj-edwards@agrsci.dk
removeNAs
A <- list('a1'='alpha','a2'='beta','a3'=c('gamma','delta'))
B <- list('alpha'='b1', 'gamma'=c('b2', 'b3'), 'delta'='b4')
mapLists(A, B)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.