[R] math symbols and text with mtext()
Juan Lewinger
lewinger at usc.edu
Mon Jul 31 11:11:52 CEST 2006
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
More information about the R-help
mailing list