From ihaka@stat.auckland.ac.nz  Wed Apr 21 22:49:39 1999
From: ihaka@stat.auckland.ac.nz (Ross Ihaka)
Date: Thu, 22 Apr 1999 09:49:39 +1200 (NZST)
Subject: do.call() mangles expressions in arguments (PR#174)
In-Reply-To: <199904211736.TAA26994@pubhealth.ku.dk>
Message-ID: <Pine.BSF.4.05.9904220938180.3355-100000@g.ihaka.slip.auckland.ac.nz>



On Wed, 21 Apr 1999 pd@biostat.ku.dk wrote:

> 
> > f<-function(x)x
> > f(expression(print("Oops")))
> expression(print("Oops"))
> > do.call("f",list(expression(print("Oops"))))
> [1] "Oops"
> 
> Something in the do_docall code causes an extra eval of the
> argument. Causes trouble with math expressions in labels in 
> boxplot (do.call("title",...))

I think this is correct behavior.  The function "list" evaluates its
arguments and when it does the "expression" call gets evaluated.

I think that it is boxplot that needs to be fixed.  There needs to be some
form of quoting for the title (and xlab, ylab arguments).  It isn't
completely obvious to me what the right solution is.  It may require a
redesign of boxplot and bxp.

	Ross

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


do.call() mangles expressions in arguments (PR#174)
Ross Ihaka