Simple function to generate REDCap choices from character vector
Examples
char2choice(c("yes/no"," yep. / nope ","",NA,"what"),.default=NA)
#> [1] "1, yes | 2, no" "1, yep. | 2, nope" NA
#> [4] NA "1, what"
Simple function to generate REDCap choices from character vector
char2choice(c("yes/no"," yep. / nope ","",NA,"what"),.default=NA)
#> [1] "1, yes | 2, no" "1, yep. | 2, nope" NA
#> [4] NA "1, what"