From f19b0119b7e94b9efca1fb7c4170d13840ce4cef Mon Sep 17 00:00:00 2001 From: egillax Date: Thu, 17 Oct 2024 16:05:02 +0200 Subject: [PATCH] fix assignment --- R/ExternalValidatePlp.R | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/R/ExternalValidatePlp.R b/R/ExternalValidatePlp.R index 2421a72d..5ddc099c 100644 --- a/R/ExternalValidatePlp.R +++ b/R/ExternalValidatePlp.R @@ -698,9 +698,12 @@ getData <- function(design, database, outputFolder, downloadTasks) { collapsed = sapply(.data$restrictPlpDataSettings, paste0, collapse = "|")) %>% dplyr::filter(.data$collapsed == paste0(design$restrictPlpDataSettings, collapse = "|")) %>% dplyr::select(-"collapsed") - task$covariateSettings <- task$covariateSettings[[1]] - if (length(task$covariateSettings) > 1) { + covariateSettings <- task$covariateSettings[[1]] + task$covariateSettings <- NULL + if (length(covariateSettings) > 1) { task$covariateSettings <- unlist(task$covariateSettings, recursive = FALSE) + } else { + task$covariateSettings <- covariateSettings } databaseName <- database$cdmDatabaseName