Running ‘testthat.R’ [15s/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.99993940 0.1416606
  [2,] -0.01100859 0.9899153
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1517453 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
             [,1]        [,2]
  [1,] 0.99960992 -0.05013433
  [2,] 0.02792856  0.99874248
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.05139185 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4709656 0.9491834
  [2,] -0.8821516 0.3147234
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.03602759 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4515620 0.9365889
  [2,] -0.8922397 0.3504301
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04629679 
  ── 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.00397 - 0.0413 == -0.0453
  
  ══ 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