Skip to content

Commit

Permalink
tidy after export_data_access_groups
Browse files Browse the repository at this point in the history
ref #186

and reorder parmaeters more #204
  • Loading branch information
wibeasley committed May 29, 2018
1 parent c542841 commit 22461a8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 11 deletions.
6 changes: 4 additions & 2 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ Minor New Features:
should be returned with the `character` data type. The default is to allow `readr::read_csv()` to guess the data type. (#194)
* `redcap_read_oneshot()` allows use to specify how many rows should be considered when `readr::read_csv()` guesses the data type. (#194)
* `redcap_read()`, `redcap_read_oneshot()`, and `redcap_read_eav()` always return Linux-style line endings (ie `\n`) instead of Windows style line endings (ie, `\r\n`) on all OSes. (#198)
* Link to new secure Zenodo DOI resolver (katrinleinweber #191)
* `read_metadata()` always returns `character` vectors for all variables. With readr 1.2.0, some column were returned differently than before. (#193)
* 'raw_orLabel_headers' now supprted (Thanks Hatem Hosny - hatemhosny, #183 & #203)
* 'raw_or_label_headers' now supported (Thanks Hatem Hosny - hatemhosny, #183 & #203)
* 'export_checkbox_labels' now supported (#186)
* Link to new secure Zenodo DOI resolver (katrinleinweber #191)
* parameters in `redcap_read()` and `redcap_read_oneshot()` are more consistent with the order in raw REDCap API. (#204)

Modified Internals:
* When converting REDCap's CSV to R's data.frame, `readr::read_csv()` is used instead of `utils::read.csv()` (Issue #127).
Expand Down
5 changes: 3 additions & 2 deletions R/redcap-read-oneshot.R
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ redcap_read_oneshot <- function(
events = NULL, events_collapsed = "",
raw_or_label = "raw",
raw_or_label_headers = "raw",
export_checkbox_label = FALSE, # exportCheckboxLabel
export_checkbox_label = FALSE,
# returnFormat
export_survey_fields = FALSE,
export_data_access_groups = FALSE,
Expand Down Expand Up @@ -243,8 +243,9 @@ redcap_read_oneshot <- function(
outcome_message = outcome_message,
records_collapsed = records_collapsed,
fields_collapsed = fields_collapsed,
filter_logic = filter_logic,
# forms
events_collapsed = events_collapsed,
filter_logic = filter_logic,
elapsed_seconds = elapsed_seconds,
raw_text = raw_text
) )
Expand Down
20 changes: 13 additions & 7 deletions R/redcap-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ redcap_read <- function(
events = NULL, events_collapsed = "",
raw_or_label = "raw",
raw_or_label_headers = "raw",
export_checkbox_label = FALSE, # exportCheckboxLabel
export_checkbox_label = FALSE,
# returnFormat
export_survey_fields = FALSE,
export_data_access_groups = FALSE,
Expand Down Expand Up @@ -141,8 +141,9 @@ redcap_read <- function(
token = token,
records_collapsed = records_collapsed,
fields_collapsed = metadata$data$field_name[1],
filter_logic = filter_logic,
# forms
events_collapsed = events_collapsed,
filter_logic = filter_logic,
guess_type = guess_type,
verbose = verbose,
config_options = config_options
Expand All @@ -156,8 +157,9 @@ redcap_read <- function(
data = data.frame(),
records_collapsed = "failed in initial batch call",
fields_collapsed = "failed in initial batch call",
filter_logic = "failed in initial batch call",
# forms
events_collapsed = "failed in initial batch call",
filter_logic = "failed in initial batch call",
elapsed_seconds = elapsed_seconds,
status_code = initial_call$status_code,
outcome_messages = outcome_messages,
Expand Down Expand Up @@ -195,13 +197,16 @@ redcap_read <- function(
token = token,
records = selected_ids,
fields_collapsed = fields_collapsed,
filter_logic = filter_logic,
events_collapsed = events_collapsed,
export_survey_fields = export_survey_fields,
export_data_access_groups = export_data_access_groups,
# forms
raw_or_label = raw_or_label,
raw_or_label_headers = raw_or_label_headers,
export_checkbox_label = export_checkbox_label,
# return_format
export_survey_fields = export_survey_fields,
export_data_access_groups = export_data_access_groups,
filter_logic = filter_logic,

guess_type = guess_type,
verbose = verbose,
config_options = config_options
Expand Down Expand Up @@ -238,8 +243,9 @@ redcap_read <- function(
outcome_messages = outcome_message_combined,
records_collapsed = records_collapsed,
fields_collapsed = fields_collapsed,
filter_logic = filter_logic,
# forms
events_collapsed = events_collapsed,
filter_logic = filter_logic,
elapsed_seconds = elapsed_seconds
) )
}
Expand Down

0 comments on commit 22461a8

Please sign in to comment.