[R] Create *png or *.jpeg plot under Linux
Alberto Monteiro
albmont at centroin.com.br
Tue Oct 16 12:48:27 CEST 2007
Marcel wrote:
>
> (...) I can't plot to *.png or *.jpeg files under
> Linux (Ubuntu) with (...)
>
> png(file,width=200,height=200) or jpeg(file,width=200,height=200)
>
A few reasons:
(1) You run R in an account that has no priviledge to
write to the directory. Check if you can write anything,
for example:
sink("test.txt"); cat("Hello, world!"); sink()
if there is a test.txt file, then you can; else this is
the problem.
(2) Maybe file is some evil-coded name, with non-standard characters.
It works under Windows, because Windows encourages the user to
create horrible filenames (when I become the World's Evil Overlord,
I will hunt the jerk that introduced whitespaces in filenames, and
send him/her to the paredón), but not under Linux.
Alberto Monteiro
More information about the R-help
mailing list