Description Usage Arguments Details Value Examples
Merges lists so that alike-named elements at the same level of list hierarchy receive the values that come last in the list of arguments.
1 |
... |
lists to be fused |
Side effect of this implementation is that elements get sorted on every level.
merged list (or vector if arguments are vectors)
1 2 3 4 5 6 7 8 9 10 11 12 | fuse(1, 2) # Returns 2
# Example 1
# x = 1 gets replaced by x = list(z = NULL)
# y = 0 gets replaced by y = 2
fuse(list(y = 0), list(x = 1, y = 2), list(x = list(z = NULL)))
# ... and the result equals list(x = list(z = NULL), y = 2)
#
# Example 2
fuse(0, list(NULL), NA, NULL) # yields NA
# ... because the last NULL is ignored
# and arguments 0, list(NULL) and NA are fused as unnamed
# and on the same level of list hierarchy
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.