powered by
Named vector to REDCap choices (`wrapping compact_vec()`)
vec2choice(data)
character string
named vector
sample(seq_len(4), 20, TRUE) |> as_factor() |> named_levels() |> sort() |> vec2choice()
Run the code above in your browser using DataLab