subjid_func: Generate sequence of "subject id"s

View source: R/table_recipe_utils.R

subjid_funcR Documentation

Generate sequence of "subject id"s

Description

Generate sequence of "subject id"s

Usage

subjid_func(n, prefix = "id", suffix = NULL, sep = "-")

Arguments

n

numeric(1). number of ids to generate. Values will be padded with leading 0s so all resulting ids have equal width

prefix

character(1). Prefix to prepend to the generated numeric ids. Defaults to "id"

suffix

character(1). Suffix to append to generated ids. Defautls to NULL (no suffix).

sep

character(1). String to use as separator when combining prefix, number, and suffix.

Value

sequence from 1 to n, prepended with prefix, and appended with suffix, separated by sep

Examples

subjid_func(5)
subjid_func(3, suffix = "x")


Roche/respectables documentation built on Oct. 2, 2024, 8:57 p.m.