[R] mtext formatting

Todd Remund tkremund98 at hotmail.com
Fri Jul 20 17:55:34 CEST 2007

I am trying to create a formatted title using mtext.  Using the format 
function I define the spacing for a specific part of the text then paste 
these together, when I put this in mtext it does not keep the spacing I 
defined. Here is an example.

x <- format(paste("X=", a), width=8)
y <- format("F=G(x)", width=8)

mtext(text=paste(x, y, sep=""), col="red", font=1)

Does anyone have any suggestions to get the mtext to follow the formatting 
as it does with cat()?

More information about the R-help mailing list