Running ‘testthat.R’ [20s/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.99597747 -0.1972040
  [2,] -0.08960396  0.9803625
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.2168415 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]        [,2]
  [1,]  0.99838199 -0.01582128
  [2,] -0.05686307  0.99987484
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.05848109 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4298855 0.9466851
  [2,] -0.9028834 0.3221605
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.02578429 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4135316 0.9552898
  [2,] -0.9104898 0.2956709
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04974462 
  ── 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.0384 - -0.0377 == -0.000663
  
  ══ 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