I often deal with objects of this form:
v <- list(one = c(a = 1, b = 2, c = 3), two = c(a = 10, b = 20, d = 30, c = 40))
and I would like to outer join these vectors by element name, to obtain:
index value.x value.y
1 a 1 10
2 b 2 20
3 c 3 40
4 d NA 30
I have written code to do this. In a nutshell, converts the vectors to data frames and reduces via successive merges. But I wonder if I have been reinventing the wheel and there is some function contained in a package, or in R base, possibly optimized. It seems a very common task.
Not sure this will be any simpler than your approach, but you could use
reshape2,lapplyand as.list. I think themelt`dcast