Running 'testthat.R' [1s/2s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(amelie)
  > 
  > test_check("amelie")
  -- 1. Failure: NAs are treated correctly (@test_ad.R#89)  ----------------------
  df_fit$train_mean not equal to c(1.966667, 1.466667).
  1/2 mismatches
  [2] 0.667 - 1.47 == -0.8
  
  -- 2. Failure: NAs are treated correctly (@test_ad.R#90)  ----------------------
  df_fit$epsilon not equal to 0.004203277.
  1/1 mismatches
  [1] 0.0158 - 0.0042 == 0.0116
  
  -- 3. Failure: fit object is printed with call and epsilon (@test_ad.R#105)  ---
  `print(df_fit)` does not match "Call:\nad(formula = y ~ x1 + x2, data = dframe)\n\nepsilon: 0.0007921529".
  Actual value: "Call:\nad(formula = y ~ x1 + x2, data = dframe)\n\nepsilon: 0.001318048"
  
  -- 4. Failure: fit object is printed with call and epsilon (@test_ad.R#108)  ---
  `print(mat_fit)` does not match "Call:\nad.default(x = x, y = y)\n\nepsilon: 0.0007921529".
  Actual value: "Call:\nad.default(x = x, y = y)\n\nepsilon: 0.001318048"
  
  -- 5. Failure: ad matches expected values for univar (@test_ad.R#135)  ---------
  df_fit_0$train_mean not equal to c(0.925, 0.35).
  2/2 mismatches (average diff: 0.163)
  [1] 0.725 - 0.925 == -0.200
  [2] 0.475 - 0.350 ==  0.125
  
  -- 6. Failure: ad matches expected values for univar (@test_ad.R#136)  ---------
  df_fit_0$train_var not equal to c(0.0225, 0.2233333333).
  2/2 mismatches (average diff: 0.0871)
  [1] 0.142 - 0.0225 ==  0.1200
  [2] 0.169 - 0.2233 == -0.0542
  
  -- 7. Failure: ad matches expected values for univar (@test_ad.R#137)  ---------
  df_fit_0$epsilon not equal to 1.805404e-08.
  1/1 mismatches
  [1] 0.000404 - 1.81e-08 == 0.000404
  
  -- 8. Failure: ad matches expected values for univar (@test_ad.R#140)  ---------
  mat_fit_0$train_mean not equal to c(0.925, 0.35).
  2/2 mismatches (average diff: 0.163)
  [1] 0.725 - 0.925 == -0.200
  [2] 0.475 - 0.350 ==  0.125
  
  -- 9. Failure: ad matches expected values for univar (@test_ad.R#141)  ---------
  mat_fit_0$train_var not equal to c(0.0225, 0.2233333333).
  2/2 mismatches (average diff: 0.0871)
  [1] 0.142 - 0.0225 ==  0.1200
  [2] 0.169 - 0.2233 == -0.0542
  
  -- 10. Failure: ad matches expected values for univar (@test_ad.R#142)  --------
  mat_fit_0$epsilon not equal to 1.805404e-08.
  1/1 mismatches
  [1] 0.000404 - 1.81e-08 == 0.000404
  
  -- 11. Failure: ad matches expected values for multivar (@test_ad.R#147)  ------
  df_fit_1$train_mean not equal to c(0.925, 0.35).
  2/2 mismatches (average diff: 0.163)
  [1] 0.725 - 0.925 == -0.200
  [2] 0.475 - 0.350 ==  0.125
  
  -- 12. Failure: ad matches expected values for multivar (@test_ad.R#148)  ------
  as.vector(df_fit_1$train_var) not equal to c(0.0225, -0.065, -0.065, 0.2233333333).
  4/4 mismatches (average diff: 0.0465)
  [1]  0.1425 -  0.0225 ==  0.12000
  [2] -0.0592 - -0.0650 ==  0.00583
  [3] -0.0592 - -0.0650 ==  0.00583
  [4]  0.1692 -  0.2233 == -0.05417
  
  -- 13. Failure: ad matches expected values for multivar (@test_ad.R#149)  ------
  df_fit_1$epsilon not equal to 3.861272e-31.
  1/1 mismatches
  [1] 0.000542 - 3.86e-31 == 0.000542
  
  -- 14. Failure: ad matches expected values for multivar (@test_ad.R#152)  ------
  mat_fit_1$train_mean not equal to c(0.925, 0.35).
  2/2 mismatches (average diff: 0.163)
  [1] 0.725 - 0.925 == -0.200
  [2] 0.475 - 0.350 ==  0.125
  
  -- 15. Failure: ad matches expected values for multivar (@test_ad.R#153)  ------
  as.vector(df_fit_1$train_var) not equal to c(0.0225, -0.065, -0.065, 0.2233333333).
  4/4 mismatches (average diff: 0.0465)
  [1]  0.1425 -  0.0225 ==  0.12000
  [2] -0.0592 - -0.0650 ==  0.00583
  [3] -0.0592 - -0.0650 ==  0.00583
  [4]  0.1692 -  0.2233 == -0.05417
  
  -- 16. Failure: ad matches expected values for multivar (@test_ad.R#154)  ------
  mat_fit_1$epsilon not equal to 3.861272e-31.
  1/1 mismatches
  [1] 0.000542 - 3.86e-31 == 0.000542
  
  -- 17. Failure: return class when type = class and probs when type = prob (@test
  predict(df_fit, newdata = dframe, type = "prob") not equal to c(...).
  6/8 mismatches (average diff: 0.66)
  [1] 4.04e-01 - 1.51e+00 == -1.10e+00
  [2] 3.89e-01 - 1.81e-05 ==  3.89e-01
  [4] 7.73e-01 - 1.97e+00 == -1.20e+00
  [5] 4.04e-01 - 1.51e+00 == -1.10e+00
  [6] 4.53e-01 - 2.83e-01 ==  1.70e-01
  [8] 1.13e-05 - 2.46e-36 ==  1.13e-05
  
  -- 18. Failure: prediction on formula object behaves according to na.action (@te
  predict(df_fit, newdata = dframe_test, type = "class", na.action = na.omit) not equal to c(1, 1, 1).
  1/3 mismatches
  [1] 0 - 1 == -1
  
  -- 19. Failure: prediction on formula object behaves according to na.action (@te
  predict(df_fit, newdata = dframe_test, type = "class") not equal to c(NA, 1, 1, 1).
  1/4 mismatches
  [2] 0 - 1 == -1
  
  -- 20. Error: multivariate version is used for multivar algorithm (@test_predict
  Lapack routine dgesv: system is exactly singular: U[2,2] = 0
  1: ad(x = x_0, y = y_0, univariate = FALSE) at testthat/test_predict.ad.R:61
  2: ad.default(x = x_0, y = y_0, univariate = FALSE)
  3: .multivariate_pdf(val_x, train_mean, train_var)
  4: rowSums((x_no_m %*% solve(x_cov)) * x_no_m)
  5: is.data.frame(x)
  6: solve(x_cov)
  7: solve.default(x_cov)
  
  -- 21. Failure: random data split works correctly 1 (@test_utils.R#90)  --------
  dat$train_x[, 1] not equal to c(5, 2, 6, 3, 8, 7).
  5/6 mismatches (average diff: 3.2)
  [1] 2 - 5 == -3
  [2] 7 - 2 ==  5
  [3] 9 - 6 ==  3
  [5] 4 - 8 == -4
  [6] 8 - 7 ==  1
  
  -- 22. Failure: random data split works correctly 1 (@test_utils.R#91)  --------
  dat$val_x[, 1] not equal to c(9, 4, 10).
  2/3 mismatches (average diff: 2)
  [1] 6 - 9 == -3
  [2] 5 - 4 ==  1
  
  -- 23. Failure: random data split works correctly 2 (@test_utils.R#98)  --------
  dat$train_x[, 1] not equal to c(9, 2, 4, 5).
  4/4 mismatches (average diff: 4.25)
  [1] 4 - 9 == -5
  [2] 6 - 2 ==  4
  [3] 9 - 4 ==  5
  [4] 2 - 5 == -3
  
  -- 24. Failure: random data split works correctly 2 (@test_utils.R#99)  --------
  dat$val_x[, 1] not equal to c(6, 3, 8, 7, 10).
  3/5 mismatches (average diff: 1)
  [1] 5 - 6 == -1
  [3] 7 - 8 == -1
  [4] 8 - 7 ==  1
  
  == testthat results  ===========================================================
  OK: 67 SKIPPED: 0 FAILED: 24
  1. Failure: NAs are treated correctly (@test_ad.R#89) 
  2. Failure: NAs are treated correctly (@test_ad.R#90) 
  3. Failure: fit object is printed with call and epsilon (@test_ad.R#105) 
  4. Failure: fit object is printed with call and epsilon (@test_ad.R#108) 
  5. Failure: ad matches expected values for univar (@test_ad.R#135) 
  6. Failure: ad matches expected values for univar (@test_ad.R#136) 
  7. Failure: ad matches expected values for univar (@test_ad.R#137) 
  8. Failure: ad matches expected values for univar (@test_ad.R#140) 
  9. Failure: ad matches expected values for univar (@test_ad.R#141) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted