Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Dec 10, 2024
1 parent 761aeda commit 82d3ebc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions R/SimCollect.R
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,17 @@ SimCollect <- function(dir=NULL, files = NULL, filename = NULL,
tmp <- try(readRDS(filenames[i]), TRUE)
if(is(tmp, 'try-error'))
stop(c('Could not read file ', filenames[i]))
readin[[i]] <- if(!is.null(select) && select %in% c('ERRORS', 'WARNINGS')){
readin[[i]] <- if(!is.null(select) && length(select) == 1L &&
any(select %in% c('ERRORS', 'WARNINGS'))){
SimExtract(tmp, what=tolower(select))
} else subset_results(tmp, select=select)
if(gc){
rm(tmp)
gc()
}
}
if(!is.null(select) && select %in% c('ERRORS', 'WARNINGS')) return(readin)
if(!is.null(select) && length(select) == 1L &&
any(select %in% c('ERRORS', 'WARNINGS'))) return(readin)
extra_info1 <- attr(readin[[1L]], 'extra_info')
ncores <- sum(sapply(readin, function(x) attr(x, 'extra_info')$ncores))
extra_info1[c("seeds", "date_completed", "summarise_list", "stored_results",
Expand Down

0 comments on commit 82d3ebc

Please sign in to comment.