Running ‘testthat.R’ [8s/11s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(iprior)
  > 
  > test_check("iprior")
  ── 1. Failure: iprior_canonical (@test-04-iprior.R#79)  ────────────────────────
  as.numeric(get_hyp(mod1)) not equal to c(0.04241322, 0.0531008).
  2/2 mismatches (average diff: 0.554)
  [1] 0.778 - 0.0424 == 0.736
  [2] 0.425 - 0.0531 == 0.372
  
  ── 2. Failure: iprior_nystrom (@test-04-iprior.R#162)  ─────────────────────────
  as.numeric(get_hyp(mod1)) not equal to c(6.663954, 0.7, 4.746405).
  2/3 mismatches (average diff: 2.52)
  [1] 3.55 - 6.66 == -3.11
  [3] 2.82 - 4.75 == -1.93
  
  ── 3. Error: Predict (formula) (@test-06-fitted_and_predict.R#36)  ─────────────
  L-BFGS-B needs finite values of 'fn'
  1: iprior(y ~ ., dat[1:3, ], kernel = "fbm", control = list(silent = TRUE)) at testthat/test-06-fitted_and_predict.R:36
  2: iprior.formula(y ~ ., dat[1:3, ], kernel = "fbm", control = list(silent = TRUE))
  3: iprior.default(y = mod, method = method, control = control)
  4: iprior_direct(mod, loglik_iprior, theta0, control.optim, control$optim.method)
  5: optim(theta0, lik.fn, object = mod, env = iprior.env, trace = TRUE, method = method, 
         control = control, hessian = TRUE)
  
  ── 4. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#10)
  logLik(mod) not equal to -53.06776.
  1/1 mismatches
  [1] -82.1 - -53.1 == -29
  
  ── 5. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#12)
  deviance(mod) not equal to 106.1355.
  1/1 mismatches
  [1] 164 - 106 == 58
  
  ── 6. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#16)
  get_intercept(mod) not equal to 17.84021.
  1/1 mismatches
  [1] 14.8 - 17.8 == -3.02
  
  ── 7. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#32)
  as.numeric(get_mse(mod)) not equal to 7.817885.
  1/1 mismatches
  [1] 11.2 - 7.82 == 3.36
  
  ── 8. Error: Nystrom methods (@test-08-ipriorMod_methods.R#64)  ────────────────
  L-BFGS-B needs finite values of 'fn'
  1: iprior(y ~ ., dat, kernel = "fbm", nystrom = 5, control = list(silent = TRUE)) at testthat/test-08-ipriorMod_methods.R:64
  2: iprior.formula(y ~ ., dat, kernel = "fbm", nystrom = 5, control = list(silent = TRUE))
  3: iprior.default(y = mod, method = method, control = control)
  4: iprior_direct(mod, loglik_nystrom, theta0, control.optim, control$optim.method)
  5: optim(theta0, lik.fn, object = mod, env = iprior.env, trace = TRUE, method = method, 
         control = control, hessian = TRUE)
  
  ── 9. Failure: Training samples (@test-08-ipriorMod_methods.R#76)  ─────────────
  as.numeric(get_mse(mod)) not equal to c(0.4624304, 21.077845).
  2/2 mismatches (average diff: 5.13)
  [1]  0.0584 -  0.462 == -0.404
  [2] 30.9420 - 21.078 ==  9.864
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 187 SKIPPED: 0 FAILED: 9
  1. Failure: iprior_canonical (@test-04-iprior.R#79) 
  2. Failure: iprior_nystrom (@test-04-iprior.R#162) 
  3. Error: Predict (formula) (@test-06-fitted_and_predict.R#36) 
  4. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#10) 
  5. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#12) 
  6. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#16) 
  7. Failure: ipriorMod methods and accessors (@test-08-ipriorMod_methods.R#32) 
  8. Error: Nystrom methods (@test-08-ipriorMod_methods.R#64) 
  9. Failure: Training samples (@test-08-ipriorMod_methods.R#76) 
  
  Error: testthat unit tests failed
  Execution halted