[R] about image(graphics) function

Henrik Bengtsson hb at maths.lth.se
Wed Dec 29 19:22:01 CET 2004


See "Code example explaining image()" on
http://www.maths.lth.se/help/R/image/.

Henrik Bengtsson

> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch 
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Sean Davis
> Sent: Wednesday, December 29, 2004 11:58 AM
> To: r-help
> Subject: Re: [R] about image(graphics) function
> 
> 
> Buhard,
> 
> 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,]
>    image(mat2,...)
> }
> 
> 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.
> 
> Sean
> 
> 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
> 
> ______________________________________________
> 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