Running ‘testthat.R’ [20s/23s]
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.9825975 0.004942805
  [2,] 0.1857475 0.999987784
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.20315 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
             [,1]       [,2]
  [1,] 0.99983653 0.04321458
  [2,] 0.01808056 0.99906581
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04414877 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4104506 0.9478289
  [2,] -0.9118828 0.3187795
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.0542186 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4590052 0.9528176
  [2,] -0.8884336 0.3035435
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.01778529 
  ── 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.134 - 0.133 == 0.000605
  
  ══ 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