Skip to contents

Autopad zeros

Usage

autopadZeros(object, ...)

# S4 method for character
autopadZeros(object)

# S4 method for integer
autopadZeros(object)

Arguments

object

Object.

...

Additional arguments.

Value

character.

Note

Updated 2023-09-21.

See also

Examples

## integer ====
autopadZeros(c(1L, 10L, 100L))
#> [1] "001" "010" "100"

## character ====
## Left side.
autopadZeros(c("1-EV-DMSO", "10-EV-DMSO", "2-EV-DMSO-B"))
#> [1] "01-EV-DMSO"   "10-EV-DMSO"   "02-EV-DMSO-B"
## Right side.
autopadZeros(c("A1", "B10", "C100"))
#> [1] "A001" "B010" "C100"