Running 'testthat.R' [51s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(SimBIID)
  > 
  > test_check("SimBIID")
  using C++ compiler: 'g++.exe (GCC) 12.2.0'
  Final run time = 0.04 secs
  
  Generation 1, accrate = 0.21, time = 0.07 secs
  
  Generation 2, accrate = 0.035, time = 2.4 secs
  
  
  Final run time = 2.5 secs
  
  using C++ compiler: 'g++.exe (GCC) 12.2.0'
  Number of iterations: 5000
  Number of particles: 75
  Mixing proportion for proposal: 0.05
  Start adaptive proposal at iteration: 100
  
  Number of parameters: 3
  
  Priors:
  beta ~ U(lower = 0, upper = 5)
  gamma ~ U(lower = 0, upper = 5)
  gamma1 ~ U(lower = 0, upper = 5)
  
  Number of classes: 4
  
  Initial states:
  state[0] = 762
  state[1] = 1
  state[2] = 0
  state[3] = 0
  
  Initialising system...
  Initialisation complete!
  
  Initial parameter values:
  
  beta = 3.54364
  gamma = 2.1883
  gamma1 = 1.00002
  
  Starting runs...
  i = 1000 acc = 0.37 time = 2.89 secs 
  i = 2000 acc = 0.25 time = 2.52 secs 
  i = 3000 acc = 0.27 time = 2.39 secs 
  i = 4000 acc = 0.23 time = 2.59 secs 
  i = 5000 acc = 0.21 time = 2.74 secs 
  Final time = 13.13 secs 
  using C++ compiler: 'g++.exe (GCC) 12.2.0'
  
  cc1plus.exe: out of memory allocating 65536 bytes
  make[1]: *** [D:/RCompile/recent/R/etc/x64/Makeconf:272: file96807fe51b2c.o] Error 1
  make[1]: Entering directory '/d/temp/RtmpwnDK3I/sourceCpp-x86_64-w64-mingw32-1.0.10/sourcecpp_96803d6522fd'
  g++ -std=gnu++17  -I"D:/RCompile/recent/R/include" -DNDEBUG   -I"D:/RCompile/CRANpkg/lib/4.3/Rcpp/include" -I"D:/temp/RtmpwnDK3I/sourceCpp-x86_64-w64-mingw32-1.0.10"   -I"d:/rtools43/x86_64-w64-mingw32.static.posix/include"     -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign  -c file96807fe51b2c.cpp -o file96807fe51b2c.o
  make[1]: Leaving directory '/d/temp/RtmpwnDK3I/sourceCpp-x86_64-w64-mingw32-1.0.10/sourcecpp_96803d6522fd'
  
  WARNING: The tools required to build C++ code for R were not found.
  
  Please download and install the appropriate version of Rtools:
  
  http://cran.r-project.org/bin/windows/Rtools/
  
  [ FAIL 1 | WARN 0 | SKIP 4 | PASS 1 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-run.R:18'): mparse/run works ─────────────────────────────────
  `compileRcpp(model)` threw an unexpected error.
  Message: Error 1 occurred building shared library.
  Class:   simpleError/error/condition
  Backtrace:
       ▆
    1. ├─testthat::expect_error(compileRcpp(model), NA) at test-run.R:18:4
    2. │ └─testthat:::expect_condition_matching(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. ├─SimBIID::compileRcpp(model)
    8. │ └─base::source(filename)
    9. │   ├─base::withVisible(eval(ei, envir))
   10. │   └─base::eval(ei, envir)
   11. │     └─base::eval(ei, envir)
   12. └─Rcpp::cppFunction("NumericVector simFunction(NumericVector pars, double tstart, double tstop, IntegerVector u) { \n\n    // initialise variables\n    double tstar = 0.0, totrate = 0.0;\n    int i = 0;\n    \n    // initialise time and rates of the system\n    double t = tstart;\n    NumericVector rates(1);\n\n    // update rates\n    rates[0] = pars[0]*u[0]*u[1];\n    totrate = sum(rates);\n    \n    // check states\n    for(i = 0; i < u.size(); i++){\n        if(u[i] < 0) {\n            stop(\"Some states less than zero\");\n        }\n    }\n    \n    // check rates\n    for(i = 0; i < rates.size(); i++){\n        if(R_FINITE(rates[i])) {\n            if(rates[i] < 0.0) {\n                stop(\"Some rates less than zero or non-finite\");\n            }\n        } else {\n            stop(\"Some rates are non-finite\");\n        }\n    }\n\n    // set up output vector\n    NumericVector out(u.size() + 2);\n    \n    // sample next event time\n    if(totrate > 0.0) {\n        tstar = t + R::rexp(1.0 / totrate);\n        while(tstar < tstop){\n            // update event type\n            u[0]--;\n            u[1]++;\n        \n            // update rates\n            rates[0] = pars[0]*u[0]*u[1];\n            totrate = sum(rates);\n            \n            // check states\n            for(i = 0; i < u.size(); i++){\n                if(u[i] < 0) {\n                    stop(\"Some states less than zero\");\n                }\n            }\n            \n            // check rates\n            for(i = 0; i < rates.size(); i++){\n                if(R_FINITE(rates[i])) {\n                    if(rates[i] < 0.0) {\n                        stop(\"Some rates less than zero or non-finite\");\n                    }\n                } else {\n                    stop(\"Some rates are non-finite\");\n                }\n            }\n            \n            // update time\n            t = tstar;\n            \n            // sample next event time\n            if(totrate > 0.0) {\n                tstar = t + R::rexp(1.0 / totrate);\n            } else {\n                tstar = tstop;\n            }\n        }\n    }\n    \n    // record final event time\n    if(totrate > 0.0) {\n        t = tstop;\n    }\n    \n    // set output\n    out[0] = (totrate == 0.0 ? 1:0);\n    out[1] = t;\n    out[Range(2, u.size() + 1)] = as<NumericVector>(u);\n    \n    // return output\n    return out;\n}")
   13.   └─Rcpp::sourceCpp(...)
  
  [ FAIL 1 | WARN 0 | SKIP 4 | PASS 1 ]
  Error: Test failures
  Execution halted