[R-SIG-Mac] tilde expansion in graphics devices
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Sep 1 18:40:35 CEST 2008
On Mon, 1 Sep 2008, Tim Bergsma wrote:
> Hi.
>
> Use of tilde in filenames passed to graphics drivers crashes R on Mac
> (2.7.1.45970/i386/9.4.0/MacBookPro3,1/2/4). This is true in the GUI
> as well as on the command line. For example...
>
> png("~/myplot.png")
> plot(cos)
> dev.off()
>
> ...causes a crash. tiff() has the same problem. jpeg() does not
> crash, but the display of the image seems unreliable.
>
> In Windows, all three issue a warning, though png() warns on
> initialization, while tiff() warns on closure.
A completely different device, as is the standard Unix one (and that does
support tilde-expansion).
> In both Windows and Mac, setwd("~/") has the expected effect,
> suggesting that tilde expansion is supportable in principle.
In principle, yes. By the particular utility software used, not
necessarily (which is why png and tiff behave differently on Windows).
>
> Apologies if this is a known problem.
>
> Tim Bergsma , PhD.
> Metrum Research Group, LLC
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
--
Brian D. Ripley, ripley at 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
More information about the R-SIG-Mac
mailing list