Skip to content

Commit

Permalink
update spaces & pipes
Browse files Browse the repository at this point in the history
I'm kinda surprised the different REDCap versions space the pipes differently

ref #542
  • Loading branch information
wibeasley committed Oct 13, 2024
1 parent 53945cb commit 31dc0af
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 96 deletions.
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
structure(list(field_name = c("record_id", "name_first", "name_last",
"address", "telephone", "email", "dob", "age", "sex", "race",
"ethnicity", "interpreter_needed"), form_name = c("demographics",
"demographics", "demographics", "demographics", "demographics",
"demographics", "demographics", "demographics", "demographics",
structure(list(field_name = c("record_id", "name_first", "name_last",
"address", "telephone", "email", "dob", "age", "sex", "race",
"ethnicity", "interpreter_needed"), form_name = c("demographics",
"demographics", "demographics", "demographics", "demographics",
"demographics", "demographics", "demographics", "demographics",
"race_and_ethnicity", "race_and_ethnicity", "race_and_ethnicity"
), section_header = c(NA, "Contact Information", NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA), field_type = c("text", "text", "text",
"notes", "text", "text", "text", "text", "radio", "checkbox",
"radio", "truefalse"), field_label = c("Study ID", "First Name",
"Last Name", "Street, City, State, ZIP", "Phone number", "E-mail",
"Date of birth", "Age (years)", "Gender", "Race (Select all that apply)",
"Ethnicity", "Are interpreter services requested?"), select_choices_or_calculations = c(NA,
NA, NA, NA, NA, NA, NA, NA, "0, Female | 1, Male", "1, American Indian/Alaska Native | 2, Asian | 3, Native Hawaiian or Other Pacific Islander | 4, Black or African American | 5, White | 6, Unknown / Not Reported",
"0, Unknown / Not Reported | 1, NOT Hispanic or Latino | 2, Hispanic or Latino",
NA), field_note = c(NA, NA, NA, NA, "Include Area Code", NA,
NA, NA, NA, NA, NA, NA), text_validation_type_or_show_slider_number = c(NA,
NA, NA, NA, "phone", "email", "date_ymd", NA, NA, NA, NA, NA),
text_validation_min = c(NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_), text_validation_max = c(NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_), identifier = c(NA, "y", "y",
"y", "y", "y", "y", NA, NA, NA, NA, NA), branching_logic = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), required_field = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), custom_alignment = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), question_number = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_group_name = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_ranking = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), field_annotation = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_)), row.names = c(NA,
), section_header = c(NA, "Contact Information", NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA), field_type = c("text", "text", "text",
"notes", "text", "text", "text", "text", "radio", "checkbox",
"radio", "truefalse"), field_label = c("Study ID", "First Name",
"Last Name", "Street, City, State, ZIP", "Phone number", "E-mail",
"Date of birth", "Age (years)", "Gender", "Race (Select all that apply)",
"Ethnicity", "Are interpreter services requested?"), select_choices_or_calculations = c(NA,
NA, NA, NA, NA, NA, NA, NA, "0, Female|1, Male", "1, American Indian/Alaska Native|2, Asian|3, Native Hawaiian or Other Pacific Islander|4, Black or African American|5, White|6, Unknown / Not Reported",
"0, Unknown / Not Reported|1, NOT Hispanic or Latino|2, Hispanic or Latino",
NA), field_note = c(NA, NA, NA, NA, "Include Area Code", NA,
NA, NA, NA, NA, NA, NA), text_validation_type_or_show_slider_number = c(NA,
NA, NA, NA, "phone", "email", "date_ymd", NA, NA, NA, NA, NA),
text_validation_min = c(NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_), text_validation_max = c(NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_), identifier = c(NA, "y", "y",
"y", "y", "y", "y", NA, NA, NA, NA, NA), branching_logic = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), required_field = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), custom_alignment = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), question_number = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_group_name = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_ranking = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), field_annotation = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_)), row.names = c(NA,
-12L), class = c("tbl_df", "tbl", "data.frame"))
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
structure(list(field_name = c("record_id", "name_first", "name_last",
"address", "telephone", "email", "dob", "age", "sex"), form_name = c("demographics",
"demographics", "demographics", "demographics", "demographics",
structure(list(field_name = c("record_id", "name_first", "name_last",
"address", "telephone", "email", "dob", "age", "sex"), form_name = c("demographics",
"demographics", "demographics", "demographics", "demographics",
"demographics", "demographics", "demographics", "demographics"
), section_header = c(NA, "Contact Information", NA, NA, NA,
NA, NA, NA, NA), field_type = c("text", "text", "text", "notes",
"text", "text", "text", "text", "radio"), field_label = c("Study ID",
"First Name", "Last Name", "Street, City, State, ZIP", "Phone number",
"E-mail", "Date of birth", "Age (years)", "Gender"), select_choices_or_calculations = c(NA,
NA, NA, NA, NA, NA, NA, NA, "0, Female | 1, Male"), field_note = c(NA,
NA, NA, NA, "Include Area Code", NA, NA, NA, NA), text_validation_type_or_show_slider_number = c(NA,
NA, NA, NA, "phone", "email", "date_ymd", NA, NA), text_validation_min = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), text_validation_max = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), identifier = c(NA,
"y", "y", "y", "y", "y", "y", NA, NA), branching_logic = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), required_field = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), custom_alignment = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), question_number = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_group_name = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_ranking = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), field_annotation = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_)), row.names = c(NA,
), section_header = c(NA, "Contact Information", NA, NA, NA,
NA, NA, NA, NA), field_type = c("text", "text", "text", "notes",
"text", "text", "text", "text", "radio"), field_label = c("Study ID",
"First Name", "Last Name", "Street, City, State, ZIP", "Phone number",
"E-mail", "Date of birth", "Age (years)", "Gender"), select_choices_or_calculations = c(NA,
NA, NA, NA, NA, NA, NA, NA, "0, Femalew1, Male"), field_note = c(NA,
NA, NA, NA, "Include Area Code", NA, NA, NA, NA), text_validation_type_or_show_slider_number = c(NA,
NA, NA, NA, "phone", "email", "date_ymd", NA, NA), text_validation_min = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), text_validation_max = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), identifier = c(NA,
"y", "y", "y", "y", "y", "y", NA, NA), branching_logic = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), required_field = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), custom_alignment = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), question_number = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_group_name = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), matrix_ranking = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), field_annotation = c(NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_)), row.names = c(NA,
-9L), class = c("tbl_df", "tbl", "data.frame"))
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
structure(list(field_name = c("race", "ethnicity", "interpreter_needed"
), form_name = c("race_and_ethnicity", "race_and_ethnicity",
"race_and_ethnicity"), section_header = c(NA_character_, NA_character_,
), form_name = c("race_and_ethnicity", "race_and_ethnicity",
"race_and_ethnicity"), section_header = c(NA_character_, NA_character_,
NA_character_), field_type = c("checkbox", "radio", "truefalse"
), field_label = c("Race (Select all that apply)", "Ethnicity",
"Are interpreter services requested?"), select_choices_or_calculations = c("1, American Indian/Alaska Native | 2, Asian | 3, Native Hawaiian or Other Pacific Islander | 4, Black or African American | 5, White | 6, Unknown / Not Reported",
"0, Unknown / Not Reported | 1, NOT Hispanic or Latino | 2, Hispanic or Latino",
), field_label = c("Race (Select all that apply)", "Ethnicity",
"Are interpreter services requested?"), select_choices_or_calculations = c("1, American Indian/Alaska Native|2, Asian|3, Native Hawaiian or Other Pacific Islander|4, Black or African American|5, White|6, Unknown / Not Reported",
"0, Unknown / Not Reported|1, NOT Hispanic or Latino|2, Hispanic or Latino",
NA), field_note = c(NA_character_, NA_character_, NA_character_
), text_validation_type_or_show_slider_number = c(NA_character_,
NA_character_, NA_character_), text_validation_min = c(NA_character_,
NA_character_, NA_character_), text_validation_max = c(NA_character_,
NA_character_, NA_character_), identifier = c(NA_character_,
NA_character_, NA_character_), branching_logic = c(NA_character_,
NA_character_, NA_character_), required_field = c(NA_character_,
NA_character_, NA_character_), custom_alignment = c(NA_character_,
NA_character_, NA_character_), question_number = c(NA_character_,
NA_character_, NA_character_), matrix_group_name = c(NA_character_,
NA_character_, NA_character_), matrix_ranking = c(NA_character_,
NA_character_, NA_character_), field_annotation = c(NA_character_,
NA_character_, NA_character_)), row.names = c(NA, -3L), class = c("tbl_df",
), text_validation_type_or_show_slider_number = c(NA_character_,
NA_character_, NA_character_), text_validation_min = c(NA_character_,
NA_character_, NA_character_), text_validation_max = c(NA_character_,
NA_character_, NA_character_), identifier = c(NA_character_,
NA_character_, NA_character_), branching_logic = c(NA_character_,
NA_character_, NA_character_), required_field = c(NA_character_,
NA_character_, NA_character_), custom_alignment = c(NA_character_,
NA_character_, NA_character_), question_number = c(NA_character_,
NA_character_, NA_character_), matrix_group_name = c(NA_character_,
NA_character_, NA_character_), matrix_ranking = c(NA_character_,
NA_character_, NA_character_), field_annotation = c(NA_character_,
NA_character_, NA_character_)), row.names = c(NA, -3L), class = c("tbl_df",
"tbl", "data.frame"))
6 changes: 3 additions & 3 deletions inst/test-data/specific-redcapr/metadata-read/normal.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ NA, NA, NA), field_type = c("text", "text", "text", "notes",
"E-mail", "Date of birth", "Age (years)", "Gender", "Height (cm)",
"Weight (kilograms)", "BMI", "Comments", "Mugshot", "Race (Select all that apply)",
"Ethnicity", "Are interpreter services requested?"), select_choices_or_calculations = c(NA,
NA, NA, NA, NA, NA, NA, NA, "0, Female | 1, Male", NA, NA, "round(([weight]*10000)/(([height])^(2)),1)",
NA, NA, "1, American Indian/Alaska Native | 2, Asian | 3, Native Hawaiian or Other Pacific Islander | 4, Black or African American | 5, White | 6, Unknown / Not Reported",
"0, Unknown / Not Reported | 1, NOT Hispanic or Latino | 2, Hispanic or Latino",
NA, NA, NA, NA, NA, NA, NA, "0, Female|1, Male", NA, NA, "round(([weight]*10000)/(([height])^(2)),1)",
NA, NA, "1, American Indian/Alaska Native|2, Asian|3, Native Hawaiian or Other Pacific Islander|4, Black or African American|5, White|6, Unknown / Not Reported",
"0, Unknown / Not Reported|1, NOT Hispanic or Latino|2, Hispanic or Latino",
NA), field_note = c(NA, NA, NA, NA, "Include Area Code", NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), text_validation_type_or_show_slider_number = c(NA,
NA, NA, NA, "phone", "email", "date_ymd", NA, NA, "number", "integer",
Expand Down

0 comments on commit 31dc0af

Please sign in to comment.