add_zero: Prepend zero(s) to a number

Description Usage Arguments Value

View source: R/add_zero.R

Description

Prepend one or more 0's to a number. Useful for alphabetizing facto levels named with numbers.

Usage

1
add_zero(x, n)

Arguments

x

The vector to be modified

n

The number of characters that the resulting vector should have

Value

A character vector of identical length to x in which all elements have n characters (or more, for those which already had more prior to processing)


databrew/seroprevalence documentation built on Aug. 26, 2020, 12:03 a.m.