gen_id: Generate random ID tags

View source: R/general_functions.R

gen_idR Documentation

Generate random ID tags

Description

Generate random ID's for participants to ensure confidentiality or any other purpose. Each random ID consists of a first name followed by a random number.

Usage

gen_id(n)

Arguments

n

The number of names to generate. Set equal to the desired number. If inserting the generated list of names into a table, set to the same number of rows as the table.

See Also

The list of names used in this function were randomly drawn from the US Baby Names data set, downloadable here: https://www.kaggle.com/kaggle/us-baby-names

Examples

tibble(name=gen_id(n=3), fav_color=c("red", "blue", "green"))

ryan-a-schneider/legaldmlab documentation built on July 2, 2023, 5:02 a.m.