[R] math symbols and text with mtext()

From: Juan Lewinger <lewinger_at_usc.edu>
Date: Mon 31 Jul 2006 - 19:11:52 EST


Dear R users,

Two questions:

  1. Is there a way to simplify the mtext() line below ?

beta=c(1,-1)
m=5
plot(1)
mtext( bquote(paste( beta == .(paste( "(", paste(beta, collapse=", "), ")" )) )), outer=TRUE,line=-3)

2) How do I get the embedded carriage return "\n" below to work, i.e for the text that follows it to appear on the next line?

beta=c(1,-1)
m=5
plot(1)
mtext( bquote(paste( beta == .(paste( "(", paste(beta, collapse=", "), ") " )),

                         "\n Expected # of true positives = ", .(m))), outer=TRUE, line=-3)

Thanks in advance!

Juan Pablo Lewinger, Ph.D.
Department of Preventive Medicine
Keck School of Medicine
University of Southern California



R-help@stat.math.ethz.ch 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 Aug 01 08:41:58 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 01 Aug 2006 - 10:18:23 EST.

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