T.Wunder wrote: > > Hi, > > I'm sorry, I've found the right answer: >> x <- 0 >> formatC(x,digits=2, format="f") > [1] "0.00" > > The above worked perfectly! > Thanks & Best wishes ;) > Tom >
That old warhorse, sprintf(), can also be a trusty steed in situations like this. -Charlie -- 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. ______________________________________________ R-help@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.