what is the more elegant way of just using sprintf
without the gsub
for this line of code?
gsub(" ","0",sprintf("%2.d", 0:15))
[1] "00" "01" "02" "03" "04" "05" "06" "07" "08" "09" "10" "11" "12" "13" "14" "15"
i.e. I want the zeros infront of the single digit numbers...as output as characters.