mirror of
https://github.com/agdamsbo/REDCapCAST.git
synced 2024-11-22 05:20:23 +01:00
moved metadata names into a sysdata file
This commit is contained in:
parent
7a83e4bc45
commit
c0428f880f
@ -2,3 +2,4 @@
|
||||
^\.Rproj\.user$
|
||||
^\.travis\.yml$
|
||||
^appveyor\.yml$
|
||||
^data-raw$
|
||||
|
@ -87,14 +87,7 @@ REDCap_split <- function(records, metadata) {
|
||||
}
|
||||
|
||||
# Standardize variable names for metadata
|
||||
names(metadata) <- c(
|
||||
"field_name", "form_name", "section_header", "field_type",
|
||||
"field_label", "select_choices_or_calculations", "field_note",
|
||||
"text_validation_type_or_show_slider_number", "text_validation_min",
|
||||
"text_validation_max", "identifier", "branching_logic", "required_field",
|
||||
"custom_alignment", "question_number", "matrix_group_name", "matrix_ranking",
|
||||
"field_annotation"
|
||||
)
|
||||
names(metadata) <- metadata_names
|
||||
|
||||
# Make sure that no metadata columns are factors
|
||||
metadata <- rapply(metadata, as.character, classes = "factor", how = "replace")
|
||||
|
BIN
R/R/sysdata.rda
Normal file
BIN
R/R/sysdata.rda
Normal file
Binary file not shown.
10
R/data-raw/metadata_names.R
Normal file
10
R/data-raw/metadata_names.R
Normal file
@ -0,0 +1,10 @@
|
||||
metadata_names <- c(
|
||||
"field_name", "form_name", "section_header", "field_type",
|
||||
"field_label", "select_choices_or_calculations", "field_note",
|
||||
"text_validation_type_or_show_slider_number", "text_validation_min",
|
||||
"text_validation_max", "identifier", "branching_logic", "required_field",
|
||||
"custom_alignment", "question_number", "matrix_group_name", "matrix_ranking",
|
||||
"field_annotation"
|
||||
)
|
||||
|
||||
usethis::use_data(metadata_names, overwrite = TRUE, internal = TRUE)
|
Loading…
Reference in New Issue
Block a user