码迷,mamicode.com
首页 > 编程语言 > 详细

R语言 格式化数字

时间:2017-09-22 11:59:58      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:tty   ted   ret   form   span   格式化数字   www.   strong   stack   

 

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

R语言 格式化数字

标签:tty   ted   ret   form   span   格式化数字   www.   strong   stack   

原文地址:http://www.cnblogs.com/emanlee/p/7573594.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!