Created
May 27, 2019 18:30
-
-
Save pbaylis/368bd67fd3c9813ad28b826b9ca512d4 to your computer and use it in GitHub Desktop.
Pad integers with zeroes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x <- c(5, 15, 2015) | |
sprintf(sprintf("%03d", x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment