[R] image ()

Zivan Karaman zk at biocem.univ-bpclermont.fr
Tue Dec 8 09:01:12 CET 1998


Since it is time to give our wish list regarding the image function, I'll
simply resubmit the message that I've sent some time ago. I would
appreciate being able to produce the same type of display in R as one can
do in S+.


>
>I've a question regarding the image function, which I use frequently and
>for various purposes. Apparently, the S and the R version of the image
>function don't behave the same way. I've attached below a function that
>under S produces regular chessboard-like figures, while it produces irregular
>pattern with R (never mind different colours in R and S, this is not a
>point). Does anybody know how can one obtain the chessboard images (squares
>or rectangles of the same size) with R?
>
>Best regards
>
>Zivan
>
>
>test.image <- function(n)
>{
>	if(n < 2)
>		stop("n must be >= 2")
>	pause <- function(msg = 
>		"Press <ENTER> to continue...")
>	{
>		cat(msg)
>		readline()
>		invisible()
>	}
>	for(i in 2:n) {
>		i1 <- i + 1
>		i2 <- i * i
>		image(x = 1:i1, y = 1:i1, z = matrix(
>			1:i2, ncol = i))
>		pause()
>	}
>	invisible()
>}
>

Regards

Zivan
Zivan Karaman
Limagrain Genetics Research, B.P. 115, 63203 Riom Cedex, France
Tel: +33 (0) 473 634 343     Fax: +33 (0) 473 634 345
E-mail: zivan.karaman at biocem.univ-bpclermont.fr
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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