[R] Printing 2 digits after decimal point [SOLVED]
chuck at sharpsteen.net
Mon Feb 15 12:09:55 CET 2010
> I'm sorry, I've found the right answer:
>> x <- 0
>> formatC(x,digits=2, format="f")
>  "0.00"
> The above worked perfectly!
> Thanks & Best wishes ;)
That old warhorse, sprintf(), can also be a trusty steed in situations like
View this message in context: http://n4.nabble.com/Printing-2-digits-after-decimal-point-tp1555981p1555987.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help