Running ‘testthat.R’ [142s/147s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(Surrogate)
  > 
  > test_check("Surrogate")
  Loading required namespace: cubature
  Loading required namespace: FNN
  Loading required namespace: parallel
  [1] "Starting parallel simulations"
  [1] "Finishing parallel simulations"
  Loading required namespace: copula
  Loading required namespace: fitdistrplus
  Loading required namespace: stringr
  [ FAIL 2 | WARN 0 | SKIP 8 | PASS 109 ]
  
  ══ Skipped tests (8) ═══════════════════════════════════════════════════════════
  • On CRAN (8): 'test-fit_model_SurvSurv.R:37:13',
    'test-fit_model_SurvSurv.R:58:13', 'test-goodness_of_fit_SurvSurv.R:19:13',
    'test-goodness_of_fit_copula_models.R:8:3',
    'test-goodness_of_fit_copula_models.R:55:3',
    'test-goodness_of_fit_copula_models.R:102:3',
    'test-sensitivity_analysis_SurvSurv.R:46:3',
    'test-sensitivity_intervals.R:195:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-fit_model_ContCont_copula.R:176:3'): fit_copula_ContCont() works ──
  Error in `maxOptim(fn = fn, grad = grad, hess = hess, start = start, method = "BFGS", 
      fixed = fixed, constraints = constraints, finalHessian = finalHessian, 
      parscale = parscale, control = mControl, ...)`: NA in the initial gradient
  Backtrace:
      ▆
   1. └─Surrogate::fit_copula_ContCont(...) at test-fit_model_ContCont_copula.R:176:3
   2.   └─Surrogate:::fit_copula_submodel_ContCont(...)
   3.     ├─base::suppressWarnings(...)
   4.     │ └─base::withCallingHandlers(...)
   5.     └─maxLik::maxLik(...)
   6.       └─maxLik (local) maxRoutine(...)
   7.         └─maxLik:::maxOptim(...)
  ── Error ('test-fit_model_ContCont_copula.R:376:3'): GoF functions work ────────
  Error in `maxOptim(fn = fn, grad = grad, hess = hess, start = start, method = "BFGS", 
      fixed = fixed, constraints = constraints, finalHessian = finalHessian, 
      parscale = parscale, control = mControl, ...)`: NA in the initial gradient
  Backtrace:
      ▆
   1. └─Surrogate::fit_copula_ContCont(...) at test-fit_model_ContCont_copula.R:376:3
   2.   └─Surrogate:::fit_copula_submodel_ContCont(...)
   3.     ├─base::suppressWarnings(...)
   4.     │ └─base::withCallingHandlers(...)
   5.     └─maxLik::maxLik(...)
   6.       └─maxLik (local) maxRoutine(...)
   7.         └─maxLik:::maxOptim(...)
  
  [ FAIL 2 | WARN 0 | SKIP 8 | PASS 109 ]
  Deleting unused snapshots:
  • goodness_of_fit_SurvSurv/marginal-survival-functions-gof.svg
  • goodness_of_fit_SurvSurv/prob-of-dying-wo-progression-gof.svg
  • goodness_of_fit_copula_models/association-gof-0-contcont-schizo.svg
  • goodness_of_fit_copula_models/association-gof-0-ordcont-schizo.svg
  • goodness_of_fit_copula_models/association-gof-0-ordord-schizo.svg
  • goodness_of_fit_copula_models/association-gof-1-contcont-schizo.svg
  • goodness_of_fit_copula_models/association-gof-1-ordcont-schizo.svg
  • goodness_of_fit_copula_models/association-gof-1-ordord-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-s0-contcont-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-s0-ordcont-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-s0-ordord-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-s1-contcont-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-s1-ordcont-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-s1-ordord-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-t1-contcont-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-t1-ordcont-schizo.svg
  • goodness_of_fit_copula_models/marginal-gof-t1-ordord-schizo.svg
  Error: Test failures
  Execution halted