Append to a list or environment, overwriting if necessary.

obj1 %<<% obj2

Arguments

obj1.

The object to be appended to.

obj2.

The object to append.

Examples

not_run({ x <- list(a = 1) x %<<% list(b = 2) # list(a = 1, b = 2) x %<<% list(a = 2) # list(a = 2) y <- list2env(x) y %<<% list(b = 2) # environment with a = 1 and b = 2 y %<<% list2env(list(b = 2)) # same as above y %<<% list(a = 2) # environment with a = 2 })