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

From: Roberto Brunelli <roby.brunelli_at_gmail.com>
Date: Wed, 19 Nov 2008 14:57:53 +0100


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,



R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 19 Nov 2008 - 13:59:41 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 19 Nov 2008 - 15:30:27 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive