[R]  numerical values in expressions
    Stephan Lorenzen 
    stephlo at ku.edu
       
    Mon Mar 20 07:43:27 CET 2006
    
    
  
Hi there, 
I fitted a curve to some data and want to write the equation of the
fitted curve in the figure legend. If I write 
paste(format(fitZ$estimate[1], digits=2), "e^", format(fitZ$estimate[2],
digits=2), "x +", format(fitZ$estimate[3], digits=2))
i get unformatted output, writing "e^-0.0039x" instead of superposing
the exponent. I tried several variants of "expression", but finally only
the explicit one 
expression(0.061 * e^"-0.0039x" + 0.010)
where I have to provide the values myself worked. Is there any way to
use the "expression" function to reference actual values of variables
instead of just outputting their names?
Thanks,
Stephan
    
    
More information about the R-help
mailing list