padded: pad an integer (prefix with zeroes to a fixed length)

Description Usage Arguments Value Examples

View source: R/PolyHaplotyper.R

Description

pad an integer (prefix with zeroes to a fixed length)

Usage

1
padded(x, maxx=0)

Arguments

x

vector of non-negative integers

maxx

a single integer to whose nchar all x elements will be padded; if 0 (default) the largest value in x will be used

Value

a character vector representing the values of x left-padded with 0's to the length of integer maxx or of max(x)

Examples

1
2
padded(c(21, 1, 121, NA, 0))
padded(c(21, 1, 121, NA, 0), maxx=1000)

PolyHaplotyper documentation built on June 17, 2021, 5:12 p.m.