Skip to content

quartz.save "bug"

5 messages · Hans-Jörg Bibiko, Simon Urbanek, Brian Ripley

#
Hi,

I've just encountered a tiny "bug" in the function quartz.save. It doesn't expand e.g. a leading ~ in the file name.

To fix this one could maybe change the function declaration to:

...
oc$device <- quartz
oc$type <- type
oc$file <- path.expand(file)
oc$dpi <- dpi
...


Cheers,

--Hans
#
On Dec 9, 2009, at 6:41 , Hans-J?rg Bibiko wrote:

            
Well, it's not documented to do so - it's really just pass-through for  
quartz() so if anything this is a wishlist item for the quartz()  
command. I'll see if we can accommodate that ...

Thanks,
Simon
#
On Dec 9, 2009, at 4:58 PM, Simon Urbanek wrote:

            
At least from the perspective to be consistent in writing a valid file path I would vote to put this at the end of quartz()'s wish list :)


Thanks,
--Hans
#
On Wed, 9 Dec 2009, Hans-J?rg Bibiko wrote:

            
The consistency is: those functions that do tilde expansion document 
it.  Those that do not document it should not be assumed to do so.

More to the point, quartz.save is hidden away in R.app and is 
completely undocumented (at least, according to the help system), and 
I did not know it existed.  Since quartz() is usable from R (the 
terminal command line, embedded ...) at the Mac console, could not 
quartz.save() be in package utils and be documented?

Brian
#
On Dec 9, 2009, at 12:53 , Prof Brian Ripley wrote:

            
That was partially on purpose ;) - it used to be an R.app-only goodie.
I suppose so. The original implementation was R.app-specific, but  
admittedly the current one works even outside so it's worth doing that  
- I'll have a look.

Thanks,
Simon