View source: R/assembleCodebook.R
assembleCodebook | R Documentation |
This method enables the user to construct a code book similar in style to the REDCap project codebook. The codebook is similar in nature to the data dictionary, but multiple choice fields are represented with one line per coding.
assembleCodebook(
rcon,
fields = NULL,
forms = NULL,
drop_fields = NULL,
field_types = NULL,
include_form_complete = TRUE,
expand_check = FALSE,
...
)
## S3 method for class 'redcapConnection'
assembleCodebook(
rcon,
fields = NULL,
forms = NULL,
drop_fields = NULL,
field_types = NULL,
include_form_complete = TRUE,
expand_check = FALSE,
...
)
## S3 method for class 'redcapCodebook'
as.list(x, ...)
rcon |
A |
fields |
|
forms |
|
drop_fields |
|
field_types |
|
include_form_complete |
|
expand_check |
|
... |
Arguments to pass to other methods |
x |
A |
Returns a redcapCodebook
object. This inherits the data.frame
class
and has the columns
field_name
- The name of the field.
form
- The name of the form on which the field is located.
field_type
- The field type.
code
- For multiple choice fields, the coding for the option.
label
- For multiple choice fields, the label for the option.
min
- For date and numeric fields, the minimum value in the validation, if any.
max
- For date and numeric fields, the maximum value in the validation, if any.
branching_logic
- For fields with branching logic, the string denoting the logic applied.
field_order
- The numeric order of the field in the data dictionary.
form_order
- The numeric order of the form in the data dictionary.
exportMetaData()
## Not run:
unlockREDCap(connections = c(rcon = "project_alias"),
url = "your_redcap_url",
keyring = "API_KEYs",
envir = globalenv())
# codebook for the entire project
assembleCodebook(rcon)
# codebook for multiple choice fields
assembleCodebook(rcon,
field_types = c("dropdown", "radio", "checkbox",
"yesno", "truefalse"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.