How about using the cat function to concatenate the constant string  
with the dynamic string and then bold the result of that?

-- 
Jeff Spies
http://www.nd.edu/~jspies/


On Nov 14, 2006, at 4:39 PM, Rene Braeckman wrote:

> Thanks for your quick response. This works but the problem is that  
> I can't
> define the title ahead before N is defined or changed.
>
> The idea is that the title is defined ahead, passed to a function  
> that makes
> many plots, and N is incremented for each plot.
>
> One way to accomplish this would be to have the constant part of  
> the title
> defined ahead:
>> xxx <- bquote(bold("Plot"~C[max]~"versus CrCl"))
>
> Bold is needed because the subscripted text "max" is too light  
> (doesn't seem
> to follow font changes) but I could leave it out if needed.
>
> And then add this to the changing part at the time the plot is made  
> (when
> the value of N is correct).
> The changing part is:
>> ccc <- bquote(("Figure"~.(N))
>
> I just don't know how to concatenate both xxx and ccc to create the  
> title.
>
> Thanks again,
> Rene
>
> -----Original Message-----
> From: rolf@math.unb.ca [mailto:rolf@math.unb.ca]
> Sent: Tuesday, November 14, 2006 12:42 PM
> To: RMan54@cox.net
> Cc: r-help@stat.math.ethz.ch
> Subject: Re: [R] Plot title with numeric variables
>
> The key thing is the function bquote().
>
> E.g.
>
> 	> N <- 5
> 	> xxx <- bquote(bold("Figure"~.(N)~"Plot"~C[max]~"versus CrCl"))
> 	> plot(1:10,main=xxx)
>
> (Not sure about the ``bold'' business, but R doesn't object.)
>
> Or to take a simpler and clearer example:
>
> 	> N <- 5
> 	> plot(1:10,main=bquote("Figure"~.(N))
>
>
> 				cheers,
>
> 					Rolf Turner
> 					rolf@math.unb.ca
>
> ______________________________________________
> 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.


	[[alternative HTML version deleted]]

