From 938b44a6aa7461327fae349807819fe0adc28198 Mon Sep 17 00:00:00 2001 From: Julian Sagebiel <julian.sagebiel@idiv.de> Date: Sun, 24 Nov 2024 15:40:31 +0100 Subject: [PATCH] new error when chunks smaller than no_sim --- R/sim_all.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/sim_all.R b/R/sim_all.R index 29a95c6..98fd1c8 100644 --- a/R/sim_all.R +++ b/R/sim_all.R @@ -44,6 +44,11 @@ sim_all <- function(nosim=2, resps, destype=NULL, designpath, u, bcoeff, decisio stop("Argument 'bcoeff' is required.") } + + if (no_sim < chunks) { + stop("You cannot have more chunks than runs. The number of chunks tells us how often we save the simulation results on disk. Maximum one per run.") + } + # Check if bcoeff is a list if (!is.list(bcoeff)) { stop("Argument 'bcoeff' must be a list.") -- GitLab