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
quartz.save "bug"
5 messages · Hans-Jörg Bibiko, Simon Urbanek, Brian Ripley
On Dec 9, 2009, at 6:41 , Hans-J?rg Bibiko wrote:
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.
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
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
_______________________________________________ R-SIG-Mac mailing list R-SIG-Mac at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-mac
On Dec 9, 2009, at 4:58 PM, Simon Urbanek 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 ...
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:
On Dec 9, 2009, at 4:58 PM, Simon Urbanek 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 ...
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 :)
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
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
On Dec 9, 2009, at 12:53 , Prof Brian Ripley wrote:
On Wed, 9 Dec 2009, Hans-J?rg Bibiko wrote:
On Dec 9, 2009, at 4:58 PM, Simon Urbanek 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 ...
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 :)
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.
That was partially on purpose ;) - it used to be an R.app-only goodie.
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?
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