Skip to content
Prev 173375 / 398506 Next

Combining math and variables in expression

Dear socrates;

It did not take me 2.5 hours but it did take longer than I thought it  
would. I worked off the example given by Henrique Dallazuanna seen at:
http://finzi.psych.upenn.edu/R/Rhelp08/archive/120065.html

  This seems "to work":

mtext(bquote(100~"%" ~ Area == ~ .(text.val)~ Km^2), side=3)

I cannot say the the syntactic rules are entirely clear. The proper  
placement of the tildes is a bit mysterious to me. I am wondering if a  
solution using substitute(expression(.)) might be more clear but my  
efforts in that direction were not successful.

--

David
On Mar 11, 2009, at 10:08 AM, socrates wrote:

            
David Winsemius, MD
Heritage Laboratories
West Hartford, CT