[R] how to calculate a numeric's digits count?

PO SU rhelpmaillist at 163.com
Fri Oct 24 05:35:06 CEST 2014


Dear usRers,
  Now i want to cal ,e.g. 
 cal(1.234)  will get 3
 cal(1) will get 0
 cal(1.3045) will get 4
 But the difficult part is cal(1.3450) will get 4 not 3.
So, is there anyone happen to know the solution to this problem, or it can't be solved in R, because 1.340 will always be transformed autolly to 1.34?






--

PO SU
mail: desolator88 at 163.com 
Majored in Statistics from SJTU


More information about the R-help mailing list