Running ‘testthat.R’ [14s/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.99988372 -0.04627669
  [2,] 0.01524934  0.99892866
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04734803 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]       [,2]
  [1,]  0.99748968 0.01430194
  [2,] -0.07081204 0.99989772
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.07332236 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4867903 0.9525548
  [2,] -0.8735189 0.3043673
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.06048498 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4376101 0.9542660
  [2,] -0.8991648 0.2989588
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.02285174 
  ── 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.00428 - 0.00525 == -0.000963
  
  ── 2. 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.0507 - -0.0445 == -0.0062
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  [ OK: 308 | SKIPPED: 0 | WARNINGS: 2 | FAILED: 2 ]
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  2. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted