concatenating expressions and standard text

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

concatenating expressions and standard text

manuel.martin
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: concatenating expressions and standard text

Kristel Joossens
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:

> 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
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

--
__________________________________________
Kristel Joossens        Ph.D. Student
Research Center ORSTAT  K.U. Leuven
Naamsestraat 69         Tel: +32 16 326929
3000 Leuven, Belgium    Fax: +32 16 326732
E-mail:  [hidden email]
http://www.econ.kuleuven.be/public/ndbae49

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: concatenating expressions and standard text

Paul Murrell
In reply to this post by manuel.martin
Hi


manuel.martin wrote:
> 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.


Is this what you mean ... ?

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

Paul
--
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
[hidden email]
http://www.stat.auckland.ac.nz/~paul/

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: concatenating expressions and standard text

PIKAL Petr
Hi

On 16 Dec 2005 at 12:34, Paul Murrell wrote:

Date sent:       Fri, 16 Dec 2005 12:34:04 +1300
From:           Paul Murrell <[hidden email]>
To:             "manuel.martin" <[hidden email]>
Copies to:       [hidden email]
Subject:         Re: [R] concatenating expressions and standard text

> Hi
>
>
> manuel.martin wrote:
> > 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.
>
>
> Is this what you mean ... ?
>
> plot(1, expression(paste(C[0], " in case 1")))

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

Cheers
Petr


> Paul
> --
> Dr Paul Murrell
> Department of Statistics
> The University of Auckland
> Private Bag 92019
> Auckland
> New Zealand
> 64 9 3737599 x85392
> [hidden email]
> http://www.stat.auckland.ac.nz/~paul/
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html

Petr Pikal
[hidden email]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html