Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
philchalmers committed Aug 15, 2024
1 parent f1e8ced commit 6a04915
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/tests/test-02-aggregate.R
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ test_that('aggregate', {
tmp2 <- runSimulation(Design, generate=mysim, analyse=mycompute, summarise=mycollect, max_errors=Inf,
replications = 2, parallel=FALSE, filename = 'newfile', save=TRUE,
verbose = FALSE)
Final <- SimCollect(c('this.rds', 'newfile.rds'))
Final <- SimCollect(files=c('this.rds', 'newfile.rds'))
expect_is(Final, 'data.frame')
expect_true(all(Final$REPLICATIONS == 4L))
expect_equal(tmp$ERRORS + tmp2$ERRORS, Final$ERRORS)
Expand Down Expand Up @@ -310,7 +310,7 @@ test_that('aggregate', {
analyse=mycompute_ew, summarise=mycollect, verbose=FALSE,
filename='sim2')

ret <- SimCollect(c('sim1.rds', 'sim2.rds'), warning_details = TRUE)
ret <- SimCollect(files=c('sim1.rds', 'sim2.rds'), warning_details = TRUE)
expect_true(all(na.omit(ret$WARNINGS == c(NA,NA,200,200,200,200,400,400))))
expect_true(all(ret$ERRORS > 0 | is.na(ret$ERRORS)))
expect_equal(sum(results$ERRORS + results2$ERRORS), sum(ret$ERRORS, na.rm=TRUE))
Expand Down
2 changes: 1 addition & 1 deletion vignettes/HPC-computing.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ Once complete you can now go get a beer, coffee, or whatever else tickles your f

# Post-evaluation: Combine the files

After some time has elapsed, and the job evaluation is now complete, you'll have access to the complete set of simulation files store in the file names `mysim-#.rds`. The final step in this process is then to collect all independent results into a simulation object that resembles what would have been returned from the canonical `runSimulation()` function. Fortunately, this is easy to do with `SimCollect()`. All you must do at this point is change to the working directory containing the simulation files and use `SimCollect()` with the files names to be aggregated:
After some time has elapsed, and the job evaluation is now complete, you'll have access to the complete set of simulation files store in the file names `mysim-#.rds`. The final step in this process is then to collect all independent results into a simulation object that resembles what would have been returned from the canonical `runSimulation()` function. Fortunately, this is easy to do with `SimCollect()`. All you must do at this point is point to the working directory containing the simulation files and use `SimCollect()`:


```{r eval=FALSE}
Expand Down

0 comments on commit 6a04915

Please sign in to comment.