[R] "digits" in round()
(Ted Harding)
Ted.Harding at manchester.ac.uk
Tue Mar 31 14:59:41 CEST 2009
Hi Folks,
Compare
print(1234567890,digits=4)
# [1] 1.235e+09
print(1234567890,digits=5)
# [1] 1234567890
Granted that
digits: a non-null value for 'digits' specifies the minimum
number of significant digits to be printed in values.
how does R decide to switch from the "1.235e+09" (rounded to
4 digits, i.e. the minumum, in "e" notation) to "1234567890" (the
complete raw notation, 10 digits) when 'digits' goes from 4 to 5?
Thanks,
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk>
Fax-to-email: +44 (0)870 094 0861
Date: 31-Mar-09 Time: 13:59:37
------------------------------ XFMail ------------------------------
More information about the R-help
mailing list