> c(a.1,a.2)
$v.1
[1] 1
$v.2
[1] 2
$v.3
[1] 3
aes
objects are "unevaluated expressions" and the c()
function works as expected, depending on your definition of "expected". To be safe you probably need to add back the class that gets stripped by c()
:
a.merged <- c(a.1,a.2)
class(a.merged) <- "uneval"
If you want to do it in one step then the function modifyList
will not strip the "name"-less attributes:
> modifyList(a.1, a.2)
List of 3
$ v.1: num 1
$ v.2: num 2
$ v.3: num 3
> attributes(modifyList(a.1, a.2))
$names
[1] "v.1" "v.2" "v.3"
$class
[1] "uneval"