Please stop posting Mac-specific questions on R-help. You have been
asked not to do so before ....
There _is_ a quartz.save() function in R.app, whose FAQ you are reading.
The RMacOSX-FAQ is not part of R: it is part of the separate Mac-GUI
project. You really do need to contact the authors of that project via
R-sig-mac, and use their version numbers, not R's.
On 22/10/2012 15:17, Christian Hoffmann wrote:
Hi,
In the FAQ for Mac http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html
there is
7.2 Saving the image
You can can (???) the content of the quartz device window into a PDF file.
This is not explained!
This is a very simple way to export high quality graphics from R into
other applications on Mac OS X graphics is PDF based (so are almost all
applications available). However, this process uses R's PDF device and
not Mac OS X PDF facilities and thus doesn't yeild (???)
an exact copy of the device contents. For Mac-native solution, see (see
Copying the image into the clipboard
<http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Copying-the-image-into-the-clipboard>)
and quartz.save command.
------------------------------------------------------------------------
7.3 Copying the image into the clipboard
You can copy the content of the quartz device window in the clipboard to
make the resulting image available for pasting into other applications.
The clipboard will contain both a PDF versiond (???) and a bitmap
version of the quartz device window. Which version will be used depends
on the pasting applications, most modern application will prefer the PDF
version which is of higher quality as it supports vector graphics.
In the menu bar of the quartz window > 'Edit' the copy command is
active, but the is no choice in 'File' for saving the pdf !
Note that there is currently a difference between using the clipboard
and saving to a PDF file (see Saving the image
<http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html#Saving-the-image>).
The latter will use R's PDF device which will not yield WYSIWYG results.
However, using quartz.save ...
There is no function quartz.save in 2-15-1 !
Thanks for correcting the errors in the text and for enlighten me an
quartz.save.
Christian
PS I wrote the following function for saving the quartz window (thanks
\author{Ray Brownrigg \email{r...@mcs.vuw.ac.nz}):
pdfc <- function (file = "Rplot.pdf", ...) {
current.device <- dev.cur()
dev.off(dev.copy(device = pdf, file = file, ...))
dev.set(current.device)
print(paste(file, "generated."))
}
-- Christian W. Hoffmann, CH - 8915 Hausen am Albis, Switzerland
Rigiblickstrasse 15 b, Tel.+41-44-7640853 c-w.hoffm...@sunrise.ch,
christ...@echoffmann.ch, www.echoffmann.ch
[[alternative HTML version deleted]]
______________________________________________
R-help@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.
--
Brian D. Ripley, rip...@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
______________________________________________
R-help@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.