Dear all,
I have dataset
x - list(matrix(1:20, 5, 4),matrix(1:20, 5, 4),matrix(1:20, 5, 4))
y - list(matrix(110:114, 5, 1),matrix(110:114, 5, 1),matrix(110:114, 5, 1))
I need merge x and y as list (y put in last column).
The result is something like
[[1]]
[,1] [,2] [,3] [,4] [,5]
[1,]
Here are two ways:
1. use indexes:
lapply(seq(along = x), function(i) cbind(x[[i]], y[[i]]))
2. use mapply:
mapply(cbind, x, y, SIMPLIFY = FALSE)
On 8/28/06, Muhammad Subianto [EMAIL PROTECTED] wrote:
Dear all,
I have dataset
x - list(matrix(1:20, 5, 4),matrix(1:20, 5, 4),matrix(1:20, 5,