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

Roberto Brunelli roby.brunelli at gmail.com
Wed Nov 19 14:57:53 CET 2008

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 otherwise I get a lot of numbers in the
plot when I plot/hist something. But if I invoke the function as

ploteps("foo.eps", hist, xlab = "X")

I get

Error in bquote(...) : unused argument(s) (xlab = "X")

What am I messing up?

Thanks a lot,

More information about the R-help mailing list