powered by
wrapper around mutate and str_pad
pad_col(mdb, ..., width, pad = "0", side = "left")
data frame
tidyselect
str_pad width
str_pad pad
str_pad side
# manually pad with 0's (or other value) # use case over [pad_auto()]: the desired width is greater than the widest element tibble::tibble( ID = c(2, 13, 86, 302) ) %>% pad_col(ID, width = 4)
Run the code above in your browser using DataLab