1. 程式人生 > >R語言 格式化數字

R語言 格式化數字

strong over int 語言 lan ger blog www code

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語言 格式化數字