Skip to content

concatenating expressions and standard text

4 messages · manuel.martin, Kristel Joossens, Paul Murrell +1 more

#
Hi all,

is it possible to concatenate expressions and basic text when for 
instance labeling axis of a plot? I would like to see something like the 
concatenation of expression(C[0]) and "for case 1" on my x axis.
Obviously a plot(x, y, xlab=paste(expression(C[0])," in case1")) will 
not work.

Thank you in advance,


Manuel Martin
#
Can you give an example of the expression you would like to have on you 
horizontal axis?

Simple expressions like  ex1 <- expression(1+ 0:9) seem to work well.

Kristel
manuel.martin wrote:

  
    
1 day later
#
Hi
manuel.martin wrote:
Is this what you mean ... ?

plot(1, expression(paste(C[0], " in case 1")))

Paul
#
Hi
On 16 Dec 2005 at 12:34, Paul Murrell wrote:
Date sent:      	Fri, 16 Dec 2005 12:34:04 +1300
From:           	Paul Murrell <p.murrell at auckland.ac.nz>
To:             	"manuel.martin" <manuel.martin at orleans.inra.fr>
Copies to:      	r-help at stat.math.ethz.ch
Subject:        	Re: [R] concatenating expressions and standard text
probably
plot(1, xlab = expression(paste(C[0], " in case 1")))

Cheers
Petr
Petr Pikal
petr.pikal at precheza.cz