Re: [R] do.call and plotting functions ...

2008-11-19 Thread Prof Brian Ripley
The help pages (here for bquote) are your friend. I don't think you really want to do this via do.call(), as you want some arguments evaluated and some unevaluated. Rather, match.call(), alter it as you want, and then eval.parent it. Something like ploteps <- function(file, plotFunction, ..

Re: [R] do.call and plotting functions ...

2008-11-19 Thread Gabor Grothendieck
Try this: f <- function(cmd, ...) { cat("Hello\n") mc <- match.call() mc <- mc[-1] eval.parent(mc) cat("Goodbye\n") } f(plot, 1:10) On Wed, Nov 19, 2008 at 8:57 AM, Roberto Brunelli <[EMAIL PROTECTED]> wrote: > I'm trying to write a simple wrapper for plot

[R] do.call and plotting functions ...

2008-11-19 Thread Roberto Brunelli
I'm trying to write a simple wrapper for plotting functions to make them print to postscript, something like ploteps <- function(file, plotFunction, ...) { args <- list(bquote(...)) # prepare postscript device do.call(plot, args) # close postscript device } I have inserted the bquote