[R-SIG-Mac] quartz.save tilde

Carl Witthoft carl at witthoft.com
Sat Nov 19 15:39:15 CET 2011


Just to help him out,  here's the error message I get, which pretty
clearly indicates that one of the subfunctions does not parse a tilde 
(my working directory is /users/cgw/rgames) .

Rgames> quartz.save('~/downloads/foo.png')
Error in dev.off(eval.parent(oc)) :
   QuartzBitmap_Output - unable to open file '~/downloads/foo.png'
ImageIO: could not open '/Users/cgw/Rgames/~/downloads/.foo.png-zY8H'
          error = 2
Sat Nov 19 09:35:05 TheiMac.local R[2951] <Error>:
CGImageDestinationCreate destination parameter is nil

> ------------------------------
>
> Message: 2 Date: Wed, 2 Nov 2011 22:21:42 -0400 From: Denis
> Chabot<chabot.denis at gmail.com> To: r-sig-mac at r-project.org Subject:
> [R-SIG-Mac] saving files using quartz engine
> Message-ID:<30DBF0C5-722E-4D65-85A0-87292BA89FE5 at gmail.com>
> Content-Type: text/plain; charset=us-ascii
>
> Hi,
>
> is there a reason that the quartz device does not like the "~" in
> file names, whereas most functions handling files (including pdf() )
> have no problem with it?
>
> Thus
>
> pdf(file="/Users/dchabot/Documents/Programmes R/test.pdf",
> type="pdf", width=6, height=5) # works
> pdf(file=~/Documents/Programmes R/test.pdf", type="pdf", width=6,
> height=5) # works
>
> quartz(file="~/Documents/Programmes R/test.pdf", type="pdf", width=6,
> height=5) # does not work
> quartz(file="/Users/dchabot/Documents/Programmes R/test.pdf",
> type="pdf", width=6, height=5) # works
>
-- 

Sent from my Cray XK6
"Pendeo-navem mei anguillae plena est."



More information about the R-SIG-Mac mailing list