On 28/04/2010 6:48 PM, Steve Taylor wrote:
Ted wrote:
In the second, 0.08953 rounds (to 2 significant digits) to 0.090,
which can be printed without further loss of precision as 0.09
while giving the other numbers 2 significant digits.
I guess I'm disagreeing with the idea of dropping the trailing zero. It should
be retained, since 2 significant figures was what was asked for.
Then it wouldn't be behaving as documented: "Numeric vectors are
encoded with the minimum number of decimal places needed to display all
the elements to at least the |digit| significant digits. However, if all
the elements then have trailing zeroes, the number of decimal places is
reduced until at least one element has a non-zero final digit; see also
the argument documentation for |big.*|, |small.*| etc, above. "
Duncan Murdoch
______________________________________________
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.