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.99999668 -0.1278884
  [2,] -0.00257765  0.9917886
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1360998 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]         [,2]
  [1,]  0.99886599 -0.004553729
  [2,] -0.04761017  0.999989632
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04874418 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4524843 0.9280452
  [2,] -0.8917724 0.3724675
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.07687784 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4371068 0.9472764
  [2,] -0.8994096 0.3204175
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.01508922 
  ── 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.0705 - 0.0698 == 0.000799
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 311 SKIPPED: 0 FAILED: 1
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted