[R] How do I format something as "0.000"?
Christian Hennig
fm3a004 at math.uni-hamburg.de
Mon Jan 17 16:49:35 CET 2005
Hi,
I would like to use the format function to get numbers all with three
digits to the right of the decimal point, even in cases where there is no
significant digit left. For example, I would like to get
c(0.3456789,0.0000053) as "0.346" "0.000".
It seems that it is not possible to force format to print a "0.000", i.e.
without any significant decimal places.
Is it possible to do this somehow in R?
Thanks,
Christian
***********************************************************************
Christian Hennig
Fachbereich Mathematik-SPST/ZMS, Universitaet Hamburg
hennig at math.uni-hamburg.de, http://www.math.uni-hamburg.de/home/hennig/
#######################################################################
ich empfehle www.boag-online.de
More information about the R-help
mailing list