[R-SIG-Mac] quartz.save() and ESS (was: Linux user asks: What about that Editor you have ...)

Steve Revilak steve at srevilak.net
Sun May 17 14:06:11 CEST 2009


srevilak> I'd like to ask a tangental question.

srevilak> Is there a way to have quartz.save() work from within ESS?

> From: Marc Schwartz <marc_schwartz at me.com>

> The function quart.save() is defined in a file called GUI-tools.R which 
> is part of R.app and not part of R itself. Thus, it would not be  
> available by default outside of the OSX GUI.
>
> You can see the file here:
>
>   https://svn.r-project.org/R-packages/trunk/Mac-GUI/GUI-tools.R
>
> However, trying it here, if you have R.app installed, you can use:
>
>    source("/Applications/R.app/Contents/Resources/GUI-tools.R")
>
> to make the function available outside of the GUI.
>
> Running R from a regular Terminal:
>
> > source("/Applications/R.app/Contents/Resources/GUI-tools.R")
> [R.app GUI  () i386-apple-darwin9.7.0]
>
> > plot(1:10)
> > quartz.save("plot.png")
> quartz
>      2
>
> > quartz.save("plot.pdf", type = "pdf")
> quartz
>      2


Marc,

That's a great piece of information -- it's exactly what I was looking
for.

Thanks much!

Steve



More information about the R-SIG-Mac mailing list