Hi, 
  
  Some modification to work for both positive and negative number:

nchar(format(*abs*(a),scientific=FALSE))-(trunc(log10(max(1,trunc(abs(a)))))+1)
-1.



--
View this message in context: 
http://r.789695.n4.nabble.com/How-many-digits-are-there-in-left-of-dot-of-0-0001-tp4703842p4703872.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to