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.99767801 -0.07055727
  [2,] 0.06810724  0.99750773
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.07304954 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]        [,2]
  [1,]  0.99776794 -0.08035073
  [2,] -0.06677677  0.99676665
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.08358408 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4105998 0.9531062
  [2,] -0.9118156 0.3026360
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.05400222 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4734597 0.9364526
  [2,] -0.8808155 0.3507941
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.046797 
  ── 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.0318 - 0.0327 == -0.00085
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 312 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