Running ‘testthat.R’ [18s/20s]
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.985139 -0.00349318
  [2,] 0.171759  0.99999390
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.1866199 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]        [,2]
  [1,]  0.99999946 -0.03703897
  [2,] -0.00104138  0.99931382
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.03772515 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.3943838 0.9523188
  [2,] -0.9189458 0.3051049
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.07734844 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4282612 0.9642629
  [2,] -0.9036550 0.2649474
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.06685995 
  ── 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.0223 - 0.0185 == 0.00387
  
  ── 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.0212 - -0.0222 == 0.00103
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 310 SKIPPED: 0 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