[R] Plot title with numeric variables

RMan54 RMan54 at cox.net
Tue Nov 14 20:26:01 CET 2006


I am trying to create a plot title in R with substitution by a numeric
variable (Figure number N) within the text which is bold and has a
subcripted part as well. Here is what I have:

title <- expression(bold(paste("Figure ", N, ": Plot ", C[max], " versus
CrCL")))

plot(1, main="") # Simple plot for testing
N <- 5
mtext(title, line=3, font=2, cex=1.25)

I have the bold part and the subscripted text worked out but how do I
replace the text "N" in the title by its numeric value (5 in this example)?
I tried all kinds of stuff with substitute, etc. but can't figure it out. 

The last 3 lines are actually from a function with title as argument. N is
internal to the function and changes.

Any help is much appreciated. Thanks.
Rene

-- 
View this message in context: http://www.nabble.com/Plot-title-with-numeric-variables-tf2631678.html#a7344545
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list