From f7adfb7eec3bf3552a0d1c40a4a5330d0fa17936 Mon Sep 17 00:00:00 2001 From: egillax Date: Tue, 8 Oct 2024 13:27:42 +0200 Subject: [PATCH] fix case when createValidationDesign returns multiple designs --- R/Module-PatientLevelPredictionValidation.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/Module-PatientLevelPredictionValidation.R b/R/Module-PatientLevelPredictionValidation.R index 80613159..314a7b1f 100644 --- a/R/Module-PatientLevelPredictionValidation.R +++ b/R/Module-PatientLevelPredictionValidation.R @@ -77,7 +77,11 @@ PatientLevelPredictionValidationModule <- R6::R6Class( restrictPlpDataSettings = setting$restrictPlpDataSettings, populationSettings = setting$populationSettings ) - designs[[length(designs) + 1]] <- design + # if design is single validationDesign instead of a list + if (inherits(design, "validationDesign")) { + design <- list(design) + } + designs <- c(designs, design) } databaseDetails <- PatientLevelPrediction::createDatabaseDetails(