Learn R Programming

framecleaner (version 0.2.1)

pad_col: pad column

Description

wrapper around mutate and str_pad

Usage

pad_col(mdb, ..., width, pad = "0", side = "left")

Value

data frame

Arguments

mdb

data frame

...

tidyselect

width

str_pad width

pad

str_pad pad

side

str_pad side

Examples

Run this code

 # 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