Running ‘testthat.R’ [19s/22s]
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.999999497 0.0795744
  [2,] 0.001002711 0.9968289
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.08274547 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]          [,2]
  [1,]  0.99850492 -0.0007066819
  [2,] -0.05466182  0.9999997503
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.0561569 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4553477 0.9507195
  [2,] -0.8903137 0.3100523
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.01224767 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4772185 0.9453127
  [2,] -0.8787847 0.3261655
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04564739 
  ── 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.0844 - -0.144 == 0.0598
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 309 | SKIPPED: 0 | WARNINGS: 2 | FAILED: 1 ]
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted