grapes-less-than-less-than-grapes: Append to a list or environment, overwriting if necessary.

Description Usage Arguments Examples

Description

Append to a list or environment, overwriting if necessary.

Usage

1
obj1 %<<% obj2

Arguments

obj1.

The object to be appended to.

obj2.

The object to append.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## 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

## End(Not run)

syberia/director documentation built on May 30, 2019, 10:40 p.m.