> a <- 2; b <- 3; xyplot(1:10 ~ a*(1:10), sub = c(bquote(a == .(a) ~
b==.(b))))
>
> the subtitle contains three copies of the "a = 2 b = 3" phrase.
> Why does it do that? How do I tell it to give me only one copy?
To avoid it don't wrap bquote() with c(). The following does what you asked
for:
a <- 2; b <- 3; xyplot(1:10 ~ a*(1:10), sub = bquote(a == .(a) ~
b==.(b)))
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at
r-project.org] On Behalf
> Of Richard M. Heiberger
> Sent: Thursday, November 21, 2013 9:07 PM
> To: r-help
> Subject: [R] use of bquote
>
> When I use run this expression
>
> a <- 2; b <- 3; xyplot(1:10 ~ a*(1:10), sub = c(bquote(a == .(a) ~
b==.(b))))
>
> the subtitle contains three copies of the "a = 2 b = 3" phrase.
> Why does it do that? How do I tell it to give me only one copy?
>
> Rich
>
> ______________________________________________
> 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.