Running 'testthat.R' [19s]
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.99988969 0.2514648
  [2,] 0.01485308 0.9678665
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.2835983 
  
  
  probit :
  Reference normalized matrix:
       [,1] [,2]
  [1,]    1    0
  [2,]    0    1
  Estimated normalized matrix:
              [,1]       [,2]
  [1,]  0.99929818 0.04019609
  [2,] -0.03745848 0.99919181
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.04100428 
  
  
  logit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4480947 0.9507584
  [2,] -0.8939861 0.3099329
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.00836996 
  
  
  probit :
  Reference normalized matrix:
             [,1]      [,2]
  [1,]  0.4472136 0.9486833
  [2,] -0.8944272 0.3162278
  Estimated normalized matrix:
             [,1]      [,2]
  [1,]  0.4656569 0.9461087
  [2,] -0.8849653 0.3238493
  Difference norm (Matrix norm ||.||_1, max. abs. sum on a column)
  0.02790522 
  -- 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.0371 - -0.00448 == 0.0416
  
  == testthat results  ===========================================================
  OK: 309 SKIPPED: 0 WARNINGS: 2 FAILED: 1
  1. Failure: naive computation provides the same result as vectorized computations (@test-optimParams.R#83) 
  
  Error: testthat unit tests failed
  Execution halted