Description Usage Arguments Details Value Note Examples
Invert a structure by swapping keys and values
1 2 3 4 5 6 7 8 9 10 |
x |
object to invert |
Inverts named vectors
A character vector in which the names are the former valeus.
- currently applies to atomic vectors only - apply to list (recursive structures), data.frames, matrices and arrays - invert might be an ambiguous name ... call it swap_kv? kvswap? swapKV? swapNV?
1 2 3 4 5 6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
"a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t"
21 22 23 24 25 26
"u" "v" "w" "x" "y" "z"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.