[R] plot labeling and expressions
Uwe Ligges
ligges at statistik.tu-dortmund.de
Wed Jan 16 11:55:00 CET 2008
Johannes Graumann wrote:
> Hi all,
>
> I'm trying to use an iteration that appends something to vector 'peaklabels'
> like so:
> peaklabelNames <- append(
> peaklabelNames,
> substitute(i^{z+phantom()}*" ("*a*"AMU)",list(i="y2",z=2,a=0))
> )
> The vector is supposed to be used with 'text' to put labels on signals in an
> impulse plot.
>
> While not vectorized
> substitute(i^{z+phantom()}*" ("*a*"AMU)",list(i="y2",z=2,a=0))
> works for me, the vectorized form doesn't. The labels are represented as
> "y2"^2 (AMU)
> (note the '"' in the printed string). Can anyone please give me a hint on
> how to resolve this?
I do not know what you mean by vectorized form. Can you give an example
what you want to achieve and what you tried to do so?
Uwe Ligges
> Thanks, Joh
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list