Description Usage Arguments Value Examples
Merge two objects from right to left.
1 | x %<-% y
|
x |
A named list or vector |
y |
A named list or vector. Any duplicated names are detected in x will be covered by y |
a list
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # two lists
x <- list(a = 1, b = "foo", c = 3)
y <- list(b = 2, d = 4)
x %<-% y
y %<-% x
# one list and one vector
x <- c(foo = 1, bar = 2)
y <- list(foo = "foo")
x %<-% y
y %<-% x
# two vectors
x <- c(a = 1, b = "foo", c = 3)
y <- c(b = 2, d = 4)
x %<-% y
y %<-% x
# duplicated names in x
x <- list(a = 1, b = "foo", b = 3)
y <- list(b = 2, d = 4)
x %<-% y
y %<-% x # be careful, since "3" will cover on "foo" in x, then on "2" in y
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.