Running ‘testthat.R’ [18s/21s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > 
  > # Locally:
  > #library(devtools)
  > #load_all("../")
  > 
  > # With R CMD check:
  > library(morpheus)
  > 
  > test_check("morpheus")
  
  
  logit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
             [,1]          [,2]
  [1,]  0.9921219 -0.0002753911
  [2,] -0.1252765  0.9999999621
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1331547 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
             [,1]        [,2]
  [1,] 0.99990245 0.004925848
  [2,] 0.01396776 0.999987868
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.01406531 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4889195 0.9392775
  [2,] -0.8723289 0.3431586
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.06380415 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4450272 0.9564331
  [2,] -0.8955170 0.2919517
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.03202585 
  ── 1. Failure: naive computation provides the same result as vectorized computat
  op$grad_f(x)[var] not equal to (op$f(x + dir_h) - op$f(x))/h.
  1/1 mismatches
  [1] -0.00941 - -0.00175 == -0.00766
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 311 SKIPPED: 0 FAILED: 1
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted