[R] R: expression
Thomas Lumley
tlumley at u.washington.edu
Tue Jul 19 16:26:29 CEST 2005
On Tue, 19 Jul 2005, Uwe Ligges wrote:
> Clark Allan wrote:
>
>> hi all
>> i am having a problem with the expression/paste command
>> say we estimate a variable, named PHI
>> it contains the value of say 2
>> and we want to display this value as " hat(phi) = PHI" onto a graphic
>> i.e. " hat(phi)=2 "
>> how does one do this?
>>
>
> legend(-5, .3, substitute(hat(phi) == PHI, list(PHI = PHI)))
>
or
legend(-5, .3, bquote(hat(phi) == .(PHI)))
-thomas
Thomas Lumley Assoc. Professor, Biostatistics
tlumley at u.washington.edu University of Washington, Seattle
More information about the R-help
mailing list