R语言 格式化数字

 

x = 1111111234.6547389758965789345
y = formatC(x, digits = 8, format = "f")
# [1] "1111111234.65473890"


format(100000000/1000, scientific=FALSE)


REF:

https://www.r-bloggers.com/number-formatting/

https://stackoverflow.com/questions/3443687/formatting-decimal-places-in-r

https://stat.ethz.ch/R-manual/R-devel/library/base/html/formatc.html

posted @ 2017-09-22 10:33  emanlee  阅读(1218)  评论(0编辑  收藏  举报