Learn R Programming

lgr (version 0.4.4)

pad_right: Pad Character Vectors

Description

Pad Character Vectors

Arguments

x

a character vector

width

integer scalar. target string width

pad

character scalar. the symbol to pad with

Examples

Run this code
pad_left("foo", 5)
pad_right("foo", 5, ".")
pad_left(c("foo", "foooooo"), pad = ".")

Run the code above in your browser using DataLab