Why is this an error?
mat <- matrix(1:64, 8, 8)
x <- y <- 1:8
z <- outer(x, y, function(x, y) mat[x,y])
when this is not an error:
mat <- matrix(1:64, 8, 8)
x <- y <- 1:8
z <- outer(x, y, function(x, y) paste("mat[", x, ",", y, "]", sep=""))
Alberto Monteiro