[R] image function

Bill Simpson wsi at gcal.ac.uk
Thu Nov 1 10:30:23 CET 2001


> 
> I am trying  to use image() function in R and  for the set  of the
> x-locations I am providing, it keeps giving me an error:

Here is an example for you to follow.

Suppose you have a datafile in this form:
x y z
1 1 1 
1 2 2
1 3 5
2 1 3
2 2 9
2 3 2
3 1 8
3 2 4
3 3 7

data<-read.table("rstuff/data.dat",header=TRUE)
image(unique(data$x),unique(data$y),data$z, col=gray(19:0/19))

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list