Learn R Programming

framecleaner (version 0.2.1)

pad_auto: pad auto

Description

Automatically pads elements of a column to the largest sized element. Useful when an integer code with leading zeros is read in as an integer and needs to be fixed.

Usage

pad_auto(mdb, ..., side = "left", pad = "0")

Value

data frame

Arguments

mdb

data frame

...

tidyselect specification

side

str_pad side

pad

str_pad pad

Examples

Run this code

# good for putting leading 0's

tibble::tibble(x = 1:10) %>%
  pad_auto(x)

Run the code above in your browser using DataLab