lz_id: Leading Zeros in Medical Record Numbers (MRNs)

View source: R/lz_id.R

lz_idR Documentation

Leading Zeros in Medical Record Numbers (MRNs)

Description

Include or exclude leading zeros in MRNs.

MRNs have 0-8 leading zeros and 1-8 positive integers.

Usage

lz_id(x, lz)

Arguments

x

A vector.

lz

Logical: TRUE includes, and FALSE excludes, leading zeros.

Value

A character vector.

Examples

x <- c("1", "000000002")
zhaoy::lz_id(x = x, lz = TRUE)
zhaoy::lz_id(x = x, lz = FALSE)

zhaoy/zhaoy documentation built on Feb. 1, 2024, 7:50 p.m.