数値のパディング
「"1", "2", "3"」といった数値を「"01", "02", "03"」として扱う。いくつかの方法がある。
code: sprintf関数とstr_pad関数を使ったパディング.r
sprintf("%02d", c(1, 2, 3))
#> 1 "01" "02" "03"
# stringrパッケージ
stringr::str_pad(c(1, 2, 3), width = 2, pad = "0")
#> 1 "01" "02" "03"
参考
https://qiita.com/hoxo_m/items/eb251fdcc96cee86acc6
hr.icon
#知っていると便利