Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
> format(1111111, digits=10, nsmall=2, decimal.mark=".", big.mark=",") [1] "1,111,111.00"
正如预期的那样。然而:
> format(1000000, digits=10, nsmall=2, decimal.mark=".", big.mark=",") [1] "1e+06"
预期:10,000,000.00。我抬头一看?format,那里没有什么明显的。
10,000,000.00
?format
设置scientific参数:
scientific
format(1000000, digits=10, nsmall=2, decimal.mark=".", big.mark=",",scientific=FALSE) [1] "1,000,000.00"