[R] png(): Linux vs Windows

jim holtman jholtman at gmail.com
Mon Oct 13 00:09:46 CEST 2008


Seem to work fine on my R 2.7.2 version of Windows:

> png(file="myplot.png", bg="transparent", units='cm', width=12,height=15, res=200)
> plot(1:10)
> rect(1, 5, 3, 7, col="white")
> dev.off()

Did you check the version they are using.

On Sun, Oct 12, 2008 at 6:02 PM, Ted Harding
<Ted.Harding at manchester.ac.uk> wrote:
> Hi Folks,
> Quick question. I have the following line in an R code file
> which runs fine on Linux:
>
> if(PNG) png(GraphName,width=12,height=15,units="cm",res=200)
>
> I learn that, when the same code was run on a Windows machine,
> there was the following error:
>
> Error in png(GraphName,width=12,height=15,units="cm",res=200):
>        unused argument(s) (units = "cm")
>
> Sorry to be a bother -- but could a Windows Ruser put me wise
> on any differences between png() on Windows and Linux?
>
> (And, sorry, I don't know what version of R, nor what version
> of Windows, this occurred on).
>
> Thanks,
> Ted.
>
> --------------------------------------------------------------------
> E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
> Fax-to-email: +44 (0)870 094 0861
> Date: 12-Oct-08                                       Time: 23:02:41
> ------------------------------ XFMail ------------------------------
>
> ______________________________________________
> 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list