[R] jpeg in R for Windows?

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Nov 30 15:52:26 CET 2000


Robert Lundquist wrote:

> thanks for your reply. Since I'm not too fluent in R, my attempts might be
> awkward, but I'll try to describe how I did it. I use R 1.1.1, and the
> session looked as follows:
> 
> >jpeg("plot.jpg")
> >plot(sin,2*pi)
> 
> This produces a file, but I can't open it. The corresponding sequence worked
> just fine for PNG files with
> 
> >png("test.png")
> >plot(sin,2*pi)
> 
> so my understanding of it is that something happens with the jpeg driver. Am
> I wrong there?

Aha. So you forgot to use dev.off(), e.g.:

  jpeg("plot.jpg")
  plot(sin, 2*pi)
  dev.off()

does the job.

Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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