revertListAssignments | R Documentation |
Switch list elements with their names
revertListAssignments(x)
x |
list of named elements |
list with the names of x as elements and the elements of x as names
abbreviation <- list(de = "Germany", en = "England")
revertListAssignments(abbreviation)
## reverting twice results in the original list
identical(
abbreviation,
revertListAssignments(revertListAssignments(abbreviation))
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.