[R] checkerboard plot?

Deepayan Sarkar deepayansarkar at yahoo.com
Sat May 18 07:35:57 CEST 2002



image(junk) should work. See ?image for how to change colors etc.

--- Andy Bunn <abunn at montana.edu> wrote:
> Hi,
> 
> I've been doing a lot of CA modeling lately and am now wanting to make some
> checkerboard plots in R.
> 
> Let's say I have a matrix:
> 
> > is.matrix(junk)
> [1] TRUE
> > junk
>      [,1] [,2] [,3] [,4] [,5]
> [1,]    0    0    1    0    0
> [2,]    0    1    1    1    0
> [3,]    0    1    0    0    1
> [4,]    0    1    1    1    1
> [5,]    0    1    0    0    0
> >
> 
> and I want to make a checkerboard with 0 being white and 1 being black.
> 
> Any thoughts on how I wuld do this?
> 
> Thanks in advance,
> Andy
> 
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
>
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


__________________________________________________

LAUNCH - Your Yahoo! Music Experience

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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