Try this: sprintf('%.2f', 1.4)
On Thu, May 20, 2010 at 4:58 PM, Paul <p...@paulhurley.co.uk> wrote: > Hello. > > In my opinion the function > > signif(1.4,digits=3) > > should give 1.40 > > but actually gives 1.4. Is there a magic way to add the trailing digits > back (and converting to chracter at the same time ?) > > Regards, > > Paul. > > ______________________________________________ > 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. > -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O [[alternative HTML version deleted]]
______________________________________________ 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.