[R] about image(graphics) function

Sean Davis sdavis2 at mail.nih.gov
Wed Dec 29 11:58:25 CET 2004


The simplest way to do this is to make a new function, call it 
my.image, for example, that does the reordering automatically.  Then, 
you can replace calls to image with calls to my.image.

my.image(mat,...) {
   mat2 <- mat[nrow(mat):1,]

I haven't tested the above, but that is the idea.  Note how the '...' 
allows you to pass any other parameters unchanged to image.

Hope this helps.


On Dec 29, 2004, at 5:46 AM, Olivier BUHARD wrote:

> Hi all,
> is it possible to modify the way a graph obtained
> through image(graphics) is filled, I mean starting
> filling the graphical matrix by row from the
> upper-left rather than by the lower-left cell... In
> many cases, it can be usefull to have a representation
> of the data spatialy corresponding to a real support,
> as it is the case with the function image(marray) from
> Bioconductor packages, which fills the graphical
> matrix by row from upper-left, but just handles
> marrayRaw or marrayNorm objects. Of course, I could
> reorder the matrix, but it's heavier than with an
> already available function if it exists...
> Thanks a lot for help
> BUHARD Olivier
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html

More information about the R-help mailing list