fix read_redcap_tables

This commit is contained in:
Andreas Gammelgaard Damsbo 2024-04-09 10:51:31 +02:00
commit 1bdbb0df94
No known key found for this signature in database
2 changed files with 6 additions and 2 deletions

View file

@ -35,7 +35,7 @@ read_redcap_tables <- function(uri,
REDCapR::redcap_metadata_read(redcap_uri = uri, token = token)[["data"]]
if (!is.null(fields)) {
fields_test <- fields %in% unique(m$field_name)
fields_test <- fields %in% c(m$field_name,paste(unique(m$form_name),"_complete"))
if (any(!fields_test)) {
print(paste0("The following field names are invalid: ",