[R] Help on Plot Title where text is "mixed" with numerical carachters

Greg Snow 538280 at gmail.com
Thu Aug 30 16:57:13 CEST 2012


Look at the sprintf and paste functions (either one will do what you describe).

On Thu, Aug 30, 2012 at 7:49 AM, Andras Farkas <motyocska at yahoo.com> wrote:
> Dear All,
>
> I have the following code set up:
>
> x <-2000
> y <-8
> z <-3
>
> I would need to use these numbers to show up in my plot title "mixed" with text. The x,y,z numbers would need to change, the text would not. So my title should look like this
>
> "x txt1 y txt2 z txt3"
>
> so if:
> txt1=hours
> txt2=minutes
> txt3=seconds
>
> then my title of the plot should read:   2000 hours 8 minutes 3 seconds
>
> any thoughts on how to do this would be greatly apreciated
>
> thanks,
>
> Andras
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org 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.
>



-- 
Gregory (Greg) L. Snow Ph.D.
538280 at gmail.com




More information about the R-help mailing list