[R] plot labeling and expressions

From: Johannes Graumann <johannes_graumann_at_web.de>
Date: Tue, 15 Jan 2008 19:09:31 +0100

Hi all,

I'm trying to use an iteration that appends something to vector 'peaklabels' like so:
peaklabelNames <- append(

        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?

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. Received on Tue 15 Jan 2008 - 18:11:55 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 16 Jan 2008 - 11:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive