Running ‘testthat.R’ [15s/24s]
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.99868667 -0.05494556
  [2,] 0.05123408  0.99848935
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.0564562 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
             [,1]       [,2]
  [1,] 0.99628962 0.03795423
  [2,] 0.08606384 0.99927948
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.08977421 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4427909 0.9579037
  [2,] -0.8966249 0.2870898
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.03835833 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4029351 0.9499712
  [2,] -0.9152285 0.3123376
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.06507982 
  ── 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.0115 - 0.0121 == -0.000559
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 309 SKIPPED: 0 WARNINGS: 3 FAILED: 1
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted