| insert {BBmisc} | R Documentation | 
Inserts elements from xs2 into xs1 by name,
overwriting elements of equal names.
insert(xs1, xs2, elements)
| xs1 | [ | 
| xs2 | [ | 
| elements | [ | 
x1 with replaced elements from x2.
xs1 = list(a=1, b=2)
xs2 = list(b=1, c=4)
insert(xs1, xs2)
## $a
## [1] 1
## 
## $b
## [1] 1
## 
## $c
## [1] 4
insert(xs1, xs2, elements="c")
## $a
## [1] 1
## 
## $b
## [1] 2
## 
## $c
## [1] 4