Skip to content
Prev 33603 / 398506 Next

combining mathematical notation and value substitution

Faheem Mitha wrote:
Yes, thanks.
Yes. A very important statement. for mathematical annotation it's just 
parsed in a way. And it's a natural way to use an expression when doing 
*mathematical* annotation.
Yes. See Section 6.2 od the R Language Reference.
Consider you introduce a method for a certain new class, that handles 
for any imaginary reason multiplication of logicals and characters. So 
you don't want R to forbid it when constructing an expression or call.
From ?plotmath: "x*y  juxtapose x and y".

BTW: "Ingenious" from those who introduced mathematical annotation in R:
Paul Murrell and Ross Ihaka (2000). An Approach to Providing 
Mathematical Annotation in Plots, Journal of Computational and Graphical 
Statistics, 9(3): 582?599.
In the reference given in my former mail their is an example how to 
construct such an expression from calls (constructed by substitute()) 
for legend() with do.call().
Thomas already told it and ?expression says as well: "expression returns 
a vector of mode "expression" containing its arguments as unevaluated 
``calls''."


 > I'm not terribly clear what a call is. If it so similar to an
Obviously a question for Bill Venables. I admit I've not thought about 
it before. In this context the article
  W. N. Venables (2002). Programmer?s Niche, R News, 2(2): 24?26,
  ISSN 1609-3631, http://CRAN. R-project.org/doc/Rnews/,
and
  Venables & Ripley (2000): S Programming, Springer.
are nice references.

Uwe Ligges