Attach an object to the end of a list
attach_obj(x = list(), obj)
A list.
An object to be attached as the last element of the
list x
.
The list x
with obj
attached as its
last and unnamed element.
l <- list(a = 1, b = 2)
attach_obj(l, obj = 3)
#> $a
#> [1] 1
#>
#> $b
#> [1] 2
#>
#> [[3]]
#> [1] 3
#>
#> $a
#> [1] 1
#>
#> $b
#> [1] 2
#>
#> [[3]]
#> [1] 3