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
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.