Skip to content

Legend names

2 messages · Joaquim J. S. Ramalho, Uwe Ligges

#
Hi,

I need to use greek symbols in a legend. When I write:

a <- 1
leg.names <- as.expression(substitute(alpha==p,list(p=a)))
legend("bottomright",legend=leg.names,lty=1)
everything works fine. However, I want alpha=lambda=1. Therefore, I wrote:
leg.names <- as.expression(substitute(alpha==lambda==p,list(p=a)))

but this does not work.

Similarly, how can I write alpha=0, lambda=1?

Thank you very much for your help.

Joaquim Santos
#
Joaquim J. S. Ramalho wrote:
You have to group parts of alpha==lambda==p (it would not be a valid S 
statement either!), e.g.:

alpha == {lambda == p}

Uwe Ligges