Description Usage Arguments Details Value See Also
This is a utility function that employs code generation to produce R code that validates data entry workflow for errors of omission and commision.
1 2 | generate_data_validation_code(metadata, date_var, hosp_var, custom_code = NA,
updates = NULL, updates_envir_depth = 1)
|
metadata |
REDCap metadata |
date_var |
Name of variable that captures the date of entry |
hosp_var |
Name of variable that holds the hospital code |
custom_code |
Any code that is appended for custom plugin of special validation checks. |
updates |
Name of a list of RedcapUpdate(s) to be used for plugging functionality that abstracts the introduction of new variables during the projects lifecycle. See |
updates_envir_depth |
Integer of what parent frame contains updates. Default is immediate parent of calling environment (1) ie one level deep. |
Using the redcap metadata, code is generated that validates data entry during the data capture process.
This code is then evaluated into a function that is then iterated through the records to check for errors during data capture.
The result is a dataset containing the resultant errors.
A function that can be evaluated to validate data entry workflow for a single record.
Other Code Generators: generate_date_conversion_code
;
generate_formatting_code
;
generate_remove_missing_code
;
generate_remove_outliers_code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.