Skip to content

Help with expression

3 messages · Charles C. Berry, David Scott

#
I have a problem with expressions. I am trying to create a title where 
the parameter of interest is displayed as a Greek character. Which 
parameter is being considered is stored in a character variable.

As an example, if I have

param <- "alpha"

and then do

plot(0, 0, main = bquote(Parameter==.(param)))

then in the title I get "Parameter = alpha",
whereas I want the Greek character alpha.

David Scott
#
On Tue, 25 Jan 2011, David Scott wrote:

            
param <- as.name("alpha")


HTH,

Chuck
Charles C. Berry                            Dept of Family/Preventive Medicine
cberry at tajo.ucsd.edu			    UC San Diego
http://famprevmed.ucsd.edu/faculty/cberry/  La Jolla, San Diego 92093-0901
#
Thanks. Exactly what I wanted.

As usual, I played around with all sorts of things to try and get the 
expression right, but never thought of as.name.

David Scott
On 25/01/2011 4:32 a.m., Charles C. Berry wrote: