?sprintf
x <- 33
plot(0, main=sprintf("Value = %.1f", x))
On Dec 28, 2007 5:13 PM, Thomas Schwander <thomas_schwander at web.de>
wrote:> Hi there,
>
>
>
> I'm using XP with R 2.6.1
>
>
>
> I've got the following question: Is there a way to force
"virtual" digits?
>
>
>
> I mean: In the external csv-file, I read in some numbers, e.g.
"33" which is
> written into a variable.
>
>
>
> I want to add this variable into a plot with an additional digit:
"33.0".
>
>
>
> I know, that this is a kind of cheating, because the number was not
measured
> as precisely, but it looks better in the graph.
>
>
>
> Any ideas?
>
>
>
> Thanks for your help,
>
> Thomas
>
>
> [[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.
>
--
Jim Holtman
Cincinnati, OH
+1 513 646 9390
What is the problem you are trying to solve?