Running ‘testthat.R’ [19s/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.9947724 0.04121869
  [2,] -0.1021171 0.99915015
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1073447 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]         [,2]
  [1,]  0.99526415 0.0007770397
  [2,] -0.09720738 0.9999996981
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1019432 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4721208 0.9393891
  [2,] -0.8815338 0.3428529
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.03780058 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4610297 0.9466412
  [2,] -0.8873847 0.3222895
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.02085853 
  ── 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.0929 - 0.0682 == 0.0246
  
  ══ 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