sprintf

자리숫에 맞춰서 0 붙여줄 때 쓰는 방법. 특히 반올림되어서 나타나는 결과를 취급할 때 용이함.

> sprintf(“%.3f”, e)

[1] “2.718”

출처: http://rfriend.tistory.com/341 [R, Python 분석과 프로그래밍 (by R Friend)]

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *