[R] jpeg function problem with rterm.exe

Uwe Ligges ligges at statistik.uni-dortmund.de
Tue May 31 17:10:05 CEST 2005


Audouy Jerome (ext_sub) wrote:

> Hello,
> 
> I'm starting using R and runned a little script. The generated graphic could be exported correctly with RGui.exe ("file -> save as -> jpeg -> etc.")
> 
> But if I try to run the same script with Rterm.exe and followed by:
> jpeg(file="test.jpeg", quality=90)
> The created jpeg file is completely white without any color, do you know why ?
> 
> Sum up of the script:
>     library(DBI)
>     library(RODBC)
>     library(graphics)
>     # my script process
>     ...
>     ...
>     # save picture
>     jpeg(file="test.jpeg", quality=90)


Please read An Introduction to R.
Please read ?Devices
Please read ?jpeg and see its examples!

jpeg() is not intended to save a plot, but to open a jpeg device you can 
plot into and close it afterwards:

   jpeg(file="test.jpeg", quality=90)
   plot(1:10)
   dev.off()

Please try it interaktively at first.

Uwe Ligges




> 
> Thanks to help me.
> 
> Regards,
> Jérôme.
> 
> ______________________________________________
> 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