Running ‘testthat.R’ [14s/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.9921802 0.01127163
  [2,] 0.1248134 0.99993647
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1326331 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
               [,1]       [,2]
  [1,]  0.999960847 -0.1359870
  [2,] -0.008849007  0.9907106
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1452764 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4535927 0.9481440
  [2,] -0.8912091 0.3178411
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.009597222 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4368917 0.9427373
  [2,] -0.8995141 0.3335362
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.02325443 
  ── 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.0744 - -0.0736 == -0.000785
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 309 | SKIPPED: 0 | WARNINGS: 3 | FAILED: 1 ]
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted