View source: R/little_helpers.R
dssSwapKeys | R Documentation |
Swap the first level of names of a list with the second level (second level can be more named lists or a simple vector). Values are merged if necessary (see example)
dssSwapKeys(l)
l |
a list |
a list with swapped keys and values
x <- list(a = list(b = c(1,2)), y = list(b = c(2,3)))
dssSwapKeys(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.