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

John Kane jrkrideau at inbox.com
Thu Aug 30 17:06:00 CEST 2012


 ?paste
 
plot(1, main = paste(x, "hours", y , "minutes", z , "seconds", sep =" "))

John Kane
Kingston ON Canada


> -----Original Message-----
> From: motyocska at yahoo.com
> Sent: Thu, 30 Aug 2012 06:49:04 -0700 (PDT)
> To: r-help at r-project.org
> Subject: [R] Help on Plot Title where text is "mixed" with numerical
> carachters
> 
> 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.

____________________________________________________________
FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!




More information about the R-help mailing list