[R] Can't save a plot

R. Michael Weylandt michael.weylandt at gmail.com
Sat Jun 23 15:34:58 CEST 2012


Are you sure it's not working? That's exactly what the console is
supposed to display (the message means you've switched from the jpeg
_to_ the null device) -- check again to make sure the file wasn't
created -- I think you'll be pleasantly surprised.

If you're not sure where to check, look in the directory returned by
getwd(); you can do this from within R by using list.files()

Best,
Michael

On Sat, Jun 23, 2012 at 5:47 AM, Tomek.Tarczynski
<tomek.tarczynski at gmail.com> wrote:
> Hi,
> I can't save a plot in R. Even the most simple examples taken from the
> internet doesn't work:
>
> jpeg('rplot.jpg')
> plot(1:10)
> dev.off()
>
> The message that I receive is:
> "> jpeg('rplot.jpg')
>> plot(1:10)
>> dev.off()
> null device
>          1 "
>
> I've also tried using png, pdf, and so on...
>
> I've windows 7 64b.
> Ive tried R 2.15.0 x86 and x64, same result in both.
>
> Can anyone tell me what is wrong?
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Can-t-save-a-plot-tp4634281.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list