[R] combining expressions in mathplot
Uwe Ligges
ligges at statistik.tu-dortmund.de
Wed Jun 9 11:09:14 CEST 2010
On 09.06.2010 06:15, RICHARD M. HEIBERGER wrote:
> 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, 1, substitute(a ~ b, list(a=aa[[1]], b=bb[[1]])))
> text(5,2, parse(text=paste(deparse(aa[[1]]), deparse(bb[[1]]), sep="~',
> '~")))
text(5, 1, substitute(a ~"'"~ b, list(a=aa[[1]], b=bb[[1]])))
Uwe
> 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.
More information about the R-help
mailing list