Skip to content

Commit 09fb518

Browse files
committed
elevate warning to error
for missing records closes #400
1 parent c022b5e commit 09fb518

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

R/redcap-read.R

+7-7
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,11 @@ redcap_read <- function(
325325
min(selected_ids), " through ", max(selected_ids),
326326
" (ie, ", length(selected_ids), " unique subject records)."
327327
)
328-
message(
329-
"\nReading batch ", i, " of ", nrow(ds_glossary), ", with subjects ",
330-
paste(selected_ids, collapse = ','),
331-
"\n(ie, ", length(selected_ids), " unique subject records)."
332-
)
328+
# message(
329+
# "\nReading batch ", i, " of ", nrow(ds_glossary), ", with subjects ",
330+
# paste(selected_ids, collapse = ','),
331+
# "\n(ie, ", length(selected_ids), " unique subject records)."
332+
# )
333333
}
334334
read_result <- REDCapR::redcap_read_oneshot(
335335
redcap_uri = redcap_uri,
@@ -400,10 +400,10 @@ redcap_read <- function(
400400
ids_missing_rows <- setdiff(unique_ids, unique_ids_actual)
401401

402402
if (0L < length(ids_missing_rows)) {
403-
warning(sprintf(
403+
stop(sprintf(
404404
"There are %i subject(s) that are missing rows in the final dataset.\nCheck for funny values that could trip up REDCap's PHP code:\n%s.",
405405
length(ids_missing_rows),
406-
paste(ids_missing_rows, collapse="; ")
406+
paste(ids_missing_rows, collapse=",")
407407
))
408408
}
409409

0 commit comments

Comments
 (0)