make_id: Make ID

Description Usage Arguments Value Examples

View source: R/make_id.R

Description

Make IDs with fixed length and a prefix (e.g., S001, S002, ..., S100).

Usage

1
make_id(n = 100, prefix = "S", digits = 0, suffix = "")

Arguments

n

the number of IDs to generate (or a vector of numbers)

prefix

the prefix to the number (default "S")

digits

the number of digits to use for the numeric part. Only used if this is larger than the largest number of digits in n.

suffix

the suffix to the number (default "")

Value

a vector of IDs

Examples

1
2
make_id(20, "SUBJECT_")
make_id(10:30, digits = 3)

faux documentation built on Sept. 14, 2021, 1:08 a.m.