mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2026-06-19 13:17:30 +02:00
Deploying to gh-pages from @ agdamsbo/REDCapCAST@db75c3313e 🚀
This commit is contained in:
parent
bc2e23a272
commit
0b30252598
171 changed files with 7009 additions and 602 deletions
39
reference/char2choice.md
Normal file
39
reference/char2choice.md
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Simple function to generate REDCap choices from character vector
|
||||
|
||||
Simple function to generate REDCap choices from character vector
|
||||
|
||||
## Usage
|
||||
|
||||
``` r
|
||||
char2choice(data, char.split = "/", raw = NULL, .default = NA)
|
||||
```
|
||||
|
||||
## Arguments
|
||||
|
||||
- data:
|
||||
|
||||
vector
|
||||
|
||||
- char.split:
|
||||
|
||||
splitting character(s)
|
||||
|
||||
- raw:
|
||||
|
||||
specific values. Can be used for options of same length.
|
||||
|
||||
- .default:
|
||||
|
||||
default value for missing. Default is NA.
|
||||
|
||||
## Value
|
||||
|
||||
vector
|
||||
|
||||
## Examples
|
||||
|
||||
``` r
|
||||
char2choice(c("yes/no"," yep. / nope ","",NA,"what"),.default=NA)
|
||||
#> [1] "1, yes | 2, no" "1, yep. | 2, nope" NA
|
||||
#> [4] NA "1, what"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue