If z is the result then z[[i]] is formed from x[[i]] and y[[i]] using
the previous solution, viz.
z - list()
z[[1]] - mapply(cbind, x[[1]], y[[1]], SIMPLIFY = FALSE)
z[[2]] - mapply(cbind, x[[2]], y[[2]], SIMPLIFY = FALSE)
or with a for loop (which is similar to the code you posted below except
By the way here is another solution. This one recursively descends
throught the list structure so that it that works regardless
of the nesting of your lists (provided x and y are compatible)
thus it can be used in answer to both the original post and
to this one:
cbind2 - function(x, y) {
if
Dear all,
Many thanks to Gabor Grothendieck and Jim Holtman, both of you always
reply (to answer) my problems.
Regards, Muhammad Subianto
##Gabor Grothendieck
If z is the result then z[[i]] is formed from x[[i]] and y[[i]] using
the previous solution, viz.
z - list()
z[[1]] - mapply(cbind,