|
发表于 2015-8-12 07:39:16
|
显示全部楼层
- > ## 试一试
- > sprintf('1.1%f', 0.00000124)
- [1] "1.10.000001"
- > sprintf('%f', 0.00000124)
- [1] "0.000001"
- > sprintf('%f', 0.07)
- [1] "0.070000"
- > sprintf('%f', 0.07868756)
- [1] "0.078688"
- > sprintf('%f', 34)
- [1] "34.000000"
- > sprintf('%.6', 34)
- Error in sprintf("%.6", 34) : unrecognised format specification '%.6'
复制代码 |
|