Skip to content

Commit

Permalink
santity check (closes #49)
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Dec 6, 2024
1 parent 6b8fc6e commit 00e1201
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/SimCollect.R
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,9 @@ SimCollect <- function(dir=NULL, files = NULL, filename = NULL,
reps_bad <- out$REPLICATIONS != target.reps
if(any(reps_bad)){
diff <- target.reps - out$REPLICATIONS
if(diff < 0)
stop('target.reps is less than the number of replications collected',
call.=FALSE)
out$MISSED_REPLICATIONS <- as.integer(diff)
out$TARGET_REPLICATIONS <- as.integer(target.reps)
out$REPLICATIONS <- NULL
Expand Down

0 comments on commit 00e1201

Please sign in to comment.