Running ‘testthat.R’ [15s/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.99671851 -0.1486386
  [2,] 0.08094569  0.9888916
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1597471 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
               [,1]        [,2]
  [1,]  0.999963009 -0.01919037
  [2,] -0.008601214  0.99981585
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.01937452 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4666250 0.9443735
  [2,] -0.8844553 0.3288750
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.0293833 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4481585 0.9438477
  [2,] -0.8939541 0.3303808
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.0189886 
  ── 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.00349 - -0.00202 == 0.00551
  
  ══ 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