[R] image of expand.grid

juli g. pausas juli at ceam.es
Sun May 4 16:04:54 CEST 2003


Hi all,
It is not clear to me why this cannot be ploted with image. Any help?

 > g <- data.frame(expand.grid(x= 1:5, y= 1:5), z= rnorm(25))
 > image(g)
Error in image.default(g) : increasing x and y values expected
 > is.list(g)
[1] TRUE
 > g$x
 [1] 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
 > g$y
 [1] 1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5
 >


Thanks in advance

Juli



More information about the R-help mailing list