Skip to content

Commit

Permalink
changing more fields to characters
Browse files Browse the repository at this point in the history
thanks @skadauke, ref #410
  • Loading branch information
wibeasley committed Aug 25, 2022
1 parent eba6f36 commit 540ada2
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 66 deletions.
16 changes: 8 additions & 8 deletions R/redcap-project-info-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -172,23 +172,23 @@ redcap_project_info_read <- function(
purpose = readr::col_integer(),
purpose_other = readr::col_character(),
project_notes = readr::col_character(),
custom_record_label = readr::col_logical(),
secondary_unique_field = readr::col_logical(),
custom_record_label = readr::col_character(),
secondary_unique_field = readr::col_character(),
is_longitudinal = readr::col_logical(),
has_repeating_instruments_or_events = readr::col_logical(),
surveys_enabled = readr::col_logical(),
scheduling_enabled = readr::col_logical(),
record_autonumbering_enabled = readr::col_logical(),
randomization_enabled = readr::col_logical(),
ddp_enabled = readr::col_logical(),
project_irb_number = readr::col_logical(),
project_grant_number = readr::col_logical(),
project_pi_firstname = readr::col_logical(),
project_pi_lastname = readr::col_logical(),
project_irb_number = readr::col_character(),
project_grant_number = readr::col_character(),
project_pi_firstname = readr::col_character(),
project_pi_lastname = readr::col_character(),
display_today_now_button = readr::col_logical(),
missing_data_codes = readr::col_logical(),
missing_data_codes = readr::col_character(),
external_modules = readr::col_character(),
bypass_branching_erase_field_prompt = readr::col_logical(),
bypass_branching_erase_field_prompt = readr::col_character(),
.default = readr::col_character()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,22 @@ NA, NA, NA, NA, NA, "Generated & contributed by Peter Higgins at University of M
"REDCapR Test Suite: delete records from a multiple-arm project",
"Longitudinal project with only one arm", NA, NA, NA, "REDCapR using Validation Types",
"Created for \nhttps://github.com/OuhscBbmc/REDCapR/issues/386 & https://github.com/OuhscBbmc/REDCapR/pull/389"
), custom_record_label = c(NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA), secondary_unique_field = c(NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA), is_longitudinal = c(FALSE, TRUE, FALSE,
), custom_record_label = 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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_
), secondary_unique_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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_, NA_character_
), is_longitudinal = c(FALSE, TRUE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE), has_repeating_instruments_or_events = c(FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, TRUE, TRUE, FALSE,
FALSE, FALSE, FALSE, FALSE), has_repeating_instruments_or_events = c(FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
Expand All @@ -84,20 +92,45 @@ TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
), ddp_enabled = c(FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE), project_irb_number = c(NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), project_grant_number = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), project_pi_firstname = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), project_pi_lastname = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), display_today_now_button = c(TRUE,
FALSE, FALSE, FALSE, FALSE), project_irb_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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), project_grant_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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), project_pi_firstname = 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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), project_pi_lastname = 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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), display_today_now_button = c(TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE,
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), missing_data_codes = c(NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), external_modules = c("cross_project_piping,date_validation_action_tags,form_status_tweaks",
TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE), missing_data_codes = 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_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_, NA_character_,
NA_character_, NA_character_, NA_character_), external_modules = c("cross_project_piping,date_validation_action_tags,form_status_tweaks",
"cross_project_piping,date_validation_action_tags,form_status_tweaks",
"cross_project_piping,date_validation_action_tags,form_status_tweaks",
"cross_project_piping,date_validation_action_tags,form_status_tweaks",
Expand Down Expand Up @@ -125,8 +158,8 @@ TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE),
"cross_project_piping,date_validation_action_tags,form_status_tweaks",
"cross_project_piping,date_validation_action_tags,form_status_tweaks",
"cross_project_piping,date_validation_action_tags,form_status_tweaks"
), bypass_branching_erase_field_prompt = c(FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE,
FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE)), row.names = c(NA,
-28L), class = c("tbl_df", "tbl", "data.frame"))
), bypass_branching_erase_field_prompt = c("0", "0", "0",
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0")), row.names = c(NA, -28L), class = c("tbl_df", "tbl",
"data.frame"))
35 changes: 18 additions & 17 deletions inst/test-data/specific-redcapr/project-info-read/chicago.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ structure(list(project_id = 153L, project_title = "REDCapR Target Simple Static
"POSIXt"), tzone = "America/Chicago"), production_time = structure(NA_real_, class = c("POSIXct",
"POSIXt"), tzone = "America/Chicago"), in_production = FALSE,
project_language = "English", purpose = 0L, purpose_other = NA_character_,
project_notes = NA_character_, custom_record_label = NA,
secondary_unique_field = NA, is_longitudinal = FALSE, has_repeating_instruments_or_events = FALSE,
surveys_enabled = FALSE, scheduling_enabled = FALSE, record_autonumbering_enabled = TRUE,
randomization_enabled = FALSE, ddp_enabled = FALSE, project_irb_number = NA,
project_grant_number = NA, project_pi_firstname = NA, project_pi_lastname = NA,
display_today_now_button = TRUE, missing_data_codes = NA,
external_modules = "cross_project_piping,date_validation_action_tags,form_status_tweaks",
bypass_branching_erase_field_prompt = FALSE), row.names = c(NA,
project_notes = NA_character_, custom_record_label = NA_character_,
secondary_unique_field = NA_character_, is_longitudinal = FALSE,
has_repeating_instruments_or_events = FALSE, surveys_enabled = FALSE,
scheduling_enabled = FALSE, record_autonumbering_enabled = TRUE,
randomization_enabled = FALSE, ddp_enabled = FALSE, project_irb_number = NA_character_,
project_grant_number = NA_character_, project_pi_firstname = NA_character_,
project_pi_lastname = NA_character_, display_today_now_button = TRUE,
missing_data_codes = NA_character_, external_modules = "cross_project_piping,date_validation_action_tags,form_status_tweaks",
bypass_branching_erase_field_prompt = "0"), row.names = c(NA,
-1L), spec = structure(list(cols = list(project_id = structure(list(), class = c("collector_integer",
"collector")), project_title = structure(list(), class = c("collector_character",
"collector")), creation_time = structure(list(format = ""), class = c("collector_datetime",
Expand All @@ -20,23 +21,23 @@ structure(list(project_id = 153L, project_title = "REDCapR Target Simple Static
"collector")), purpose = structure(list(), class = c("collector_integer",
"collector")), purpose_other = structure(list(), class = c("collector_character",
"collector")), project_notes = structure(list(), class = c("collector_character",
"collector")), custom_record_label = structure(list(), class = c("collector_logical",
"collector")), secondary_unique_field = structure(list(), class = c("collector_logical",
"collector")), custom_record_label = structure(list(), class = c("collector_character",
"collector")), secondary_unique_field = structure(list(), class = c("collector_character",
"collector")), is_longitudinal = structure(list(), class = c("collector_logical",
"collector")), has_repeating_instruments_or_events = structure(list(), class = c("collector_logical",
"collector")), surveys_enabled = structure(list(), class = c("collector_logical",
"collector")), scheduling_enabled = structure(list(), class = c("collector_logical",
"collector")), record_autonumbering_enabled = structure(list(), class = c("collector_logical",
"collector")), randomization_enabled = structure(list(), class = c("collector_logical",
"collector")), ddp_enabled = structure(list(), class = c("collector_logical",
"collector")), project_irb_number = structure(list(), class = c("collector_logical",
"collector")), project_grant_number = structure(list(), class = c("collector_logical",
"collector")), project_pi_firstname = structure(list(), class = c("collector_logical",
"collector")), project_pi_lastname = structure(list(), class = c("collector_logical",
"collector")), project_irb_number = structure(list(), class = c("collector_character",
"collector")), project_grant_number = structure(list(), class = c("collector_character",
"collector")), project_pi_firstname = structure(list(), class = c("collector_character",
"collector")), project_pi_lastname = structure(list(), class = c("collector_character",
"collector")), display_today_now_button = structure(list(), class = c("collector_logical",
"collector")), missing_data_codes = structure(list(), class = c("collector_logical",
"collector")), missing_data_codes = structure(list(), class = c("collector_character",
"collector")), external_modules = structure(list(), class = c("collector_character",
"collector")), bypass_branching_erase_field_prompt = structure(list(), class = c("collector_logical",
"collector"))), default = structure(list(), class = c("collector_guess",
"collector")), bypass_branching_erase_field_prompt = structure(list(), class = c("collector_character",
"collector"))), default = structure(list(), class = c("collector_character",
"collector")), delim = ","), class = "col_spec"), class = c("spec_tbl_df",
"tbl_df", "tbl", "data.frame"))
34 changes: 17 additions & 17 deletions inst/test-data/specific-redcapr/project-info-read/simple.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ structure(list(project_id = 153L, project_title = "REDCapR Target Simple Static
"POSIXt"), tzone = "UTC"), production_time = structure(NA_real_, class = c("POSIXct",
"POSIXt"), tzone = "UTC"), in_production = FALSE, project_language = "English",
purpose = 0L, purpose_other = NA_character_, project_notes = NA_character_,
custom_record_label = NA, secondary_unique_field = NA, is_longitudinal = FALSE,
has_repeating_instruments_or_events = FALSE, surveys_enabled = FALSE,
scheduling_enabled = FALSE, record_autonumbering_enabled = TRUE,
randomization_enabled = FALSE, ddp_enabled = FALSE, project_irb_number = NA,
project_grant_number = NA, project_pi_firstname = NA, project_pi_lastname = NA,
display_today_now_button = TRUE, missing_data_codes = NA,
external_modules = "cross_project_piping,date_validation_action_tags,form_status_tweaks",
bypass_branching_erase_field_prompt = FALSE), row.names = c(NA,
custom_record_label = NA_character_, secondary_unique_field = NA_character_,
is_longitudinal = FALSE, has_repeating_instruments_or_events = FALSE,
surveys_enabled = FALSE, scheduling_enabled = FALSE, record_autonumbering_enabled = TRUE,
randomization_enabled = FALSE, ddp_enabled = FALSE, project_irb_number = NA_character_,
project_grant_number = NA_character_, project_pi_firstname = NA_character_,
project_pi_lastname = NA_character_, display_today_now_button = TRUE,
missing_data_codes = NA_character_, external_modules = "cross_project_piping,date_validation_action_tags,form_status_tweaks",
bypass_branching_erase_field_prompt = "0"), row.names = c(NA,
-1L), spec = structure(list(cols = list(project_id = structure(list(), class = c("collector_integer",
"collector")), project_title = structure(list(), class = c("collector_character",
"collector")), creation_time = structure(list(format = ""), class = c("collector_datetime",
Expand All @@ -20,23 +20,23 @@ structure(list(project_id = 153L, project_title = "REDCapR Target Simple Static
"collector")), purpose = structure(list(), class = c("collector_integer",
"collector")), purpose_other = structure(list(), class = c("collector_character",
"collector")), project_notes = structure(list(), class = c("collector_character",
"collector")), custom_record_label = structure(list(), class = c("collector_logical",
"collector")), secondary_unique_field = structure(list(), class = c("collector_logical",
"collector")), custom_record_label = structure(list(), class = c("collector_character",
"collector")), secondary_unique_field = structure(list(), class = c("collector_character",
"collector")), is_longitudinal = structure(list(), class = c("collector_logical",
"collector")), has_repeating_instruments_or_events = structure(list(), class = c("collector_logical",
"collector")), surveys_enabled = structure(list(), class = c("collector_logical",
"collector")), scheduling_enabled = structure(list(), class = c("collector_logical",
"collector")), record_autonumbering_enabled = structure(list(), class = c("collector_logical",
"collector")), randomization_enabled = structure(list(), class = c("collector_logical",
"collector")), ddp_enabled = structure(list(), class = c("collector_logical",
"collector")), project_irb_number = structure(list(), class = c("collector_logical",
"collector")), project_grant_number = structure(list(), class = c("collector_logical",
"collector")), project_pi_firstname = structure(list(), class = c("collector_logical",
"collector")), project_pi_lastname = structure(list(), class = c("collector_logical",
"collector")), project_irb_number = structure(list(), class = c("collector_character",
"collector")), project_grant_number = structure(list(), class = c("collector_character",
"collector")), project_pi_firstname = structure(list(), class = c("collector_character",
"collector")), project_pi_lastname = structure(list(), class = c("collector_character",
"collector")), display_today_now_button = structure(list(), class = c("collector_logical",
"collector")), missing_data_codes = structure(list(), class = c("collector_logical",
"collector")), missing_data_codes = structure(list(), class = c("collector_character",
"collector")), external_modules = structure(list(), class = c("collector_character",
"collector")), bypass_branching_erase_field_prompt = structure(list(), class = c("collector_logical",
"collector"))), default = structure(list(), class = c("collector_guess",
"collector")), bypass_branching_erase_field_prompt = structure(list(), class = c("collector_character",
"collector"))), default = structure(list(), class = c("collector_character",
"collector")), delim = ","), class = "col_spec"), class = c("spec_tbl_df",
"tbl_df", "tbl", "data.frame"))

0 comments on commit 540ada2

Please sign in to comment.