[R] Placing a varialbe within a text statement.
Thomas Lumley
thomas at biostat.washington.edu
Wed Feb 2 22:14:41 CET 2000
On Wed, 2 Feb 2000, Matt Pocernich wrote:
> I have a simple question.
>
> On a plot, I would like to place text containing a calculated value. What is the format?
>
> For example.
>
> I would like the following text to appear on a plot.
>
> The average temperature is 23.1 degrees.
>
> I'm guessing the command is
> text( x, y, "The average temperature is " %variable name% "degrees")
>
You're guessing incorrectly. Try
text(x,y,paste("The average temperature is ", variable, "degrees"))
Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list