subjid_func.Rd
Generate sequence of "subject id"s
subjid_func(n, prefix = "id", suffix = NULL, sep = "-")
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 |
suffix | character(1). Suffix to append to generated ids. Defautls to |
sep | character(1). String to use as separator when combining |
sequence from 1 to n
, prepended with prefix
, and appended with suffix
, separated by sep
subjid_func(5)#> [1] "id-1" "id-2" "id-3" "id-4" "id-5"subjid_func(3, suffix = "x")#> [1] "id-1-x" "id-2-x" "id-3-x"