[R] combining expressions in mathplot

From: RICHARD M. HEIBERGER <rmh_at_temple.edu>
Date: Wed, 09 Jun 2010 00:15:19 -0400


Is there a cleaner way of combining two expressions.

This example works and gives what I want

plot(1:10)
aa <- expression(alpha==.05)
bb <- expression(beta ==.80)
aabb <- expression(alpha==.05 ~ ", " ~ beta ==.80)

text(5, 10, aa)
text(5,  9, bb)
text(5,  8, aabb)

text(5,1, parse(text=paste(deparse(aa[[1]]), deparse(bb[[1]]), sep="~"))) text(5,2, parse(text=paste(deparse(aa[[1]]), deparse(bb[[1]]), sep="~', '~")))

Is there a cleaner way of combining the expressions aa and bb to get the effect of the last two lines?

        [[alternative HTML version deleted]]



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 Wed 09 Jun 2010 - 04:17:24 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 09 Jun 2010 - 09:40:28 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