Running ‘testthat.R’ [61s/64s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > if (require("testthat")) {
  +     test_check("surveillance")
  + }
  Loading required package: testthat
  Loading required package: surveillance
  Loading required package: sp
  Loading required package: xtable
  Loading required package: polyCub
  This is surveillance 1.14.0. For overview type 'help(surveillance)'.
  
  Penalized log-likelihood:
  Checking analytical score vector using numDeriv::grad() ...
  [1] TRUE
  Checking analytical Fisher information matrix using numDeriv::hessian() ...
  [1] "Mean relative difference: 3.802109e-07"
  
  Penalized log-likelihood:
  Checking analytical score vector using numDeriv::grad() ...
  [1] TRUE
  Checking analytical Fisher information matrix using numDeriv::hessian() ...
  [1] "Mean relative difference: 1.551014e-07"
  'F' vs. cubature using method = "midpoint" ... TRUE 
  'Fcircle' vs. cubature using method = "midpoint" ... TRUE 
  'deriv' vs. numerical derivative ... TRUE 
  'Deriv' vs. cubature using method = "midpoint" ... TRUE 
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  'F' vs. cubature using method = "SV" ... TRUE 
  'Fcircle' vs. cubature using method = "SV" ... TRUE 
  'deriv' vs. numerical derivative ... TRUE 
  'Deriv' vs. cubature using method = "SV" ... 
  	siaf parameter 1: TRUE 
  	siaf parameter 2: TRUE 
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  'F' vs. cubature using method = "midpoint" ... TRUE 
  'Fcircle' vs. cubature using method = "midpoint" ... TRUE 
  'deriv' vs. numerical derivative ... TRUE 
  'Deriv' vs. cubature using method = "midpoint" ... 
  	siaf parameter 1: TRUE 
  	siaf parameter 2: TRUE 
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  Checking 'intrfr' against a numeric approximation ... OK
  'F' vs. cubature using method = "SV" ... TRUE 
  'deriv' vs. numerical derivative ... TRUE 
  'Deriv' vs. cubature using method = "SV" ... 
  	siaf parameter 1: TRUE 
  	siaf parameter 2: TRUE 
  'F' vs. cubature using method = "midpoint" ... TRUE 
  'Fcircle' vs. cubature using method = "midpoint" ... TRUE 
  'deriv' vs. numerical derivative ... TRUE 
  'Deriv' vs. cubature using method = "midpoint" ... 
  	siaf parameter 1: TRUE 
  	siaf parameter 2: TRUE 
  	siaf parameter 3: TRUE 
  1. Error: siaf.powerlaw() engines agree (@test-siafs.R#102) --------------------
  abnormal termination of integration routine (1)
  1: expect_equal_CnR(siafgen = siaf.powerlaw, pargrid = cbind(0.5, log(c(0.1, 1, 2)))) at testthat/test-siafs.R:102
  2: apply(pargrid, 1, function(pars) c(C = siafC$F(polydomain, , pars), R = siafR$F(polydomain, 
         , pars))) at testthat/test-siafs.R:87
  3: FUN(newX[, i], ...)
  4: siafC$F(polydomain, , pars) at testthat/test-siafs.R:87
  5: siaf_polyCub_iso(polydomain$bdry, "intrfr.powerlaw", siafpars, list(...))
  6: lapply(X = polys, FUN = siaf_polyCub1_iso, intrfr_code = INTRFR_CODE[intrfr_name], 
         pars = pars, subdivisions = control$subdivisions, rel.tol = control$rel.tol, 
         abs.tol = control$abs.tol, stop.on.error = control$stop.on.error)
  7: FUN(X[[i]], ...)
  
  2. Error: siaf.powerlawL() engines agree (@test-siafs.R#112) -------------------
  abnormal termination of integration routine (1)
  1: expect_equal_CnR(siafgen = siaf.powerlawL, pargrid = cbind(-0.5, log(c(0.1, 1, 2)))) at testthat/test-siafs.R:112
  2: apply(pargrid, 1, function(pars) c(siafC$Deriv(polydomain, , pars), siafR$Deriv(polydomain, 
         , pars))) at testthat/test-siafs.R:93
  3: FUN(newX[, i], ...)
  4: siafC$Deriv(polydomain, , pars) at testthat/test-siafs.R:93
  5: siaf_polyCub_iso(polydomain$bdry, "intrfr.powerlawL.dlogd", siafpars, list(...))
  6: lapply(X = polys, FUN = siaf_polyCub1_iso, intrfr_code = INTRFR_CODE[intrfr_name], 
         pars = pars, subdivisions = control$subdivisions, rel.tol = control$rel.tol, 
         abs.tol = control$abs.tol, stop.on.error = control$stop.on.error)
  7: FUN(X[[i]], ...)
  
  testthat results ================================================================
  OK: 241 SKIPPED: 0 FAILED: 2
  1. Error: siaf.powerlaw() engines agree (@test-siafs.R#102) 
  2. Error: siaf.powerlawL() engines agree (@test-siafs.R#112) 
  
  Error: testthat unit tests failed
  Execution halted