Skip to content
Back to formatted view

Raw Message

Message-ID: <3B416552.117D4EFC@statistik.uni-dortmund.de>
Date: 2001-07-03T06:25:22Z
From: Uwe Ligges
Subject: How do one modify an expression?

Henrik Bengtsson wrote:
> 
> I am using expressions to annotate x and y labels in plots. I start of with
> a label as
> 
>   xlab <- expression(X)
> 
> Note that it is the user that sets this. It could also be something more
> complicated as expression(sqrt(R*G)). Can I easily add a log[2] "around"
> this expression? I would like to get
> 
>   xlab <- expression(log[2](X))
> 
> I basically know nothing about expressions.

The following seems to work:

  plot(1:10, xlab= expression(log[2](X))) 

So I don't understand your question. For help on plot annotation have a
look at:

  ?plotmath


Uwe Ligges
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._