Running 'testthat.R' [9s/10s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(OptimClassifier)
  > 
  > test_check("OptimClassifier")
  6 successful models have been tested 
   
             CP      rmse success_rate   ti_error  tii_error Nnodes
  1 0.002262443 0.3602883    0.8701923 0.04807692 0.08173077     17
  2 0.009049774 0.3466876    0.8798077 0.03846154 0.08173077     15
  3 0.011312217 0.3325311    0.8894231 0.04807692 0.06250000     11
  4 0.013574661 0.3325311    0.8894231 0.05769231 0.05288462      9
  5 0.022624434 0.3535534    0.8750000 0.03365385 0.09134615      3
  6 0.665158371 0.6430097    0.5865385 0.41346154 0.00000000      1
  6 successful models have been tested 
   
              CP      rmse success_rate   ti_error  tii_error Nnodes 
   1 0.002262443 0.3602883    0.8701923 0.04807692 0.08173077     17 
   2 0.009049774 0.3466876    0.8798077 0.03846154 0.08173077     15 
   3 0.011312217 0.3325311    0.8894231 0.04807692 0.06250000     11 
   4 0.013574661 0.3325311    0.8894231 0.05769231 0.05288462      9 
   5 0.022624434 0.3535534    0.8750000 0.03365385 0.09134615      3 
   6 0.665158371 0.6430097    0.5865385 0.41346154 0.00000000      1Call:
  rpart::rpart(formula = formula, data = training, na.action = rpart::na.rpart, 
      model = FALSE, x = FALSE, y = FALSE, cp = 0)
    n= 482 
  
            CP nsplit rel error    xerror       xstd
  1 0.66515837      0 1.0000000 1.0000000 0.04949948
  2 0.02262443      1 0.3348416 0.3348416 0.03581213
  3 0.01357466      4 0.2669683 0.3438914 0.03620379
  4 0.01131222      5 0.2533937 0.3438914 0.03620379
  
  Variable importance
   X8 X10  X9  X7  X5 X14 X13  X6 X12  X3 
   36  16  16  13  10   6   2   1   1   1 
  
  Node number 1: 482 observations,    complexity param=0.6651584
    predicted class=0  expected loss=0.4585062  P(node) =1
      class counts:   261   221
     probabilities: 0.541 0.459 
    left son=2 (219 obs) right son=3 (263 obs)
    Primary splits:
        X8  splits as  LR,          improve=119.25990, (0 missing)
        X10 < 2.5     to the left,  improve= 52.61262, (0 missing)
        X9  splits as  LR,          improve= 47.76803, (0 missing)
        X14 < 396     to the left,  improve= 32.46584, (0 missing)
        X7  < 1.0425  to the left,  improve= 31.53528, (0 missing)
    Surrogate splits:
        X9  splits as  LR, agree=0.701, adj=0.342, (0 split)
        X10 < 0.5     to the left,  agree=0.701, adj=0.342, (0 split)
        X7  < 0.435   to the left,  agree=0.699, adj=0.338, (0 split)
        X5  splits as  LLLLRRRRRRRRRR, agree=0.641, adj=0.210, (0 split)
        X14 < 127     to the left,  agree=0.606, adj=0.132, (0 split)
  
  Node number 2: 219 observations
    predicted class=0  expected loss=0.07305936  P(node) =0.4543568
      class counts:   203    16
     probabilities: 0.927 0.073 
  
  Node number 3: 263 observations,    complexity param=0.02262443
    predicted class=1  expected loss=0.2205323  P(node) =0.5456432
      class counts:    58   205
     probabilities: 0.221 0.779 
    left son=6 (99 obs) right son=7 (164 obs)
    Primary splits:
        X9  splits as  LR, improve=11.902240, (0 missing)
        X10 < 0.5     to the left,  improve=11.902240, (0 missing)
        X14 < 216.5   to the left,  improve=10.195680, (0 missing)
        X5  splits as  LLLLLLRRRRRRRR, improve= 7.627675, (0 missing)
        X13 < 72.5    to the right, improve= 6.568284, (0 missing)
    Surrogate splits:
        X10 < 0.5     to the left,  agree=1.000, adj=1.000, (0 split)
        X14 < 3       to the left,  agree=0.722, adj=0.263, (0 split)
        X12 splits as  LR-, agree=0.688, adj=0.172, (0 split)
        X5  splits as  RLRLRLRRRRRRRR, agree=0.665, adj=0.111, (0 split)
        X7  < 0.27    to the left,  agree=0.665, adj=0.111, (0 split)
  
  Node number 6: 99 observations,    complexity param=0.02262443
    predicted class=1  expected loss=0.4141414  P(node) =0.2053942
      class counts:    41    58
     probabilities: 0.414 0.586 
    left son=12 (61 obs) right son=13 (38 obs)
    Primary splits:
        X13 < 111     to the right, improve=6.520991, (0 missing)
        X5  splits as  LLLLLLLLRRRRRR, improve=5.770954, (0 missing)
        X6  splits as  LRLRL-RR, improve=4.176207, (0 missing)
        X14 < 388.5   to the left,  improve=3.403553, (0 missing)
        X3  < 2.52    to the left,  improve=2.599301, (0 missing)
    Surrogate splits:
        X3 < 4.5625  to the left,  agree=0.697, adj=0.211, (0 split)
        X2 < 22.835  to the right, agree=0.677, adj=0.158, (0 split)
        X5 splits as  RRLLRLLLLRRLLL, agree=0.667, adj=0.132, (0 split)
        X7 < 0.02    to the right, agree=0.667, adj=0.132, (0 split)
        X6 splits as  RRRLL-LR, agree=0.657, adj=0.105, (0 split)
  
  Node number 7: 164 observations
    predicted class=1  expected loss=0.1036585  P(node) =0.340249
      class counts:    17   147
     probabilities: 0.104 0.896 
  
  Node number 12: 61 observations,    complexity param=0.02262443
    predicted class=0  expected loss=0.442623  P(node) =0.126556
      class counts:    34    27
     probabilities: 0.557 0.443 
    left son=24 (49 obs) right son=25 (12 obs)
    Primary splits:
        X5  splits as  LLLL-LLLRLRRLL, improve=4.5609460, (0 missing)
        X14 < 126     to the left,  improve=3.7856330, (0 missing)
        X6  splits as  L--LL-R-, improve=3.2211680, (0 missing)
        X3  < 9.625   to the right, improve=1.0257110, (0 missing)
        X2  < 24.5    to the right, improve=0.9861812, (0 missing)
    Surrogate splits:
        X14 < 2202.5  to the left,  agree=0.836, adj=0.167, (0 split)
        X3  < 11.3125 to the left,  agree=0.820, adj=0.083, (0 split)
  
  Node number 13: 38 observations
    predicted class=1  expected loss=0.1842105  P(node) =0.07883817
      class counts:     7    31
     probabilities: 0.184 0.816 
  
  Node number 24: 49 observations,    complexity param=0.01357466
    predicted class=0  expected loss=0.3469388  P(node) =0.1016598
      class counts:    32    17
     probabilities: 0.653 0.347 
    left son=48 (34 obs) right son=49 (15 obs)
    Primary splits:
        X6  splits as  L--LL-R-, improve=2.7687880, (0 missing)
        X13 < 150     to the left,  improve=2.3016430, (0 missing)
        X14 < 126     to the left,  improve=2.2040820, (0 missing)
        X3  < 4.4575  to the right, improve=1.5322870, (0 missing)
        X5  splits as  LLRL-LRR-R--RR, improve=0.8850852, (0 missing)
    Surrogate splits:
        X2 < 50.415  to the left,  agree=0.735, adj=0.133, (0 split)
        X5 splits as  LLLL-LLL-L--LR, agree=0.735, adj=0.133, (0 split)
        X7 < 2.625   to the left,  agree=0.735, adj=0.133, (0 split)
  
  Node number 25: 12 observations
    predicted class=1  expected loss=0.1666667  P(node) =0.02489627
      class counts:     2    10
     probabilities: 0.167 0.833 
  
  Node number 48: 34 observations
    predicted class=0  expected loss=0.2352941  P(node) =0.07053942
      class counts:    26     8
     probabilities: 0.765 0.235 
  
  Node number 49: 15 observations
    predicted class=1  expected loss=0.4  P(node) =0.03112033
      class counts:     6     9
     probabilities: 0.400 0.600 
  
  -- ERROR (test-OptimDA.R:4:3): Test DA methods with Australian Credit ----------
  Error: arrange() failed at implicit mutate() step. 
  x Could not create a temporary column for `..1`.
  i `..1` is `get(column)`.
  Backtrace:
       x
    1. +-OptimClassifier::Optim.DA(Y ~ ., AustralianCredit, p = 0.8, seed = 2018) test-OptimDA.R:4:2
    2. | \-OptimClassifier:::OrderModels(summary_models, criteria)
    3. |   +-base::ifelse(...)
    4. |   +-dplyr::arrange(summary_table, get(column))
    5. |   \-dplyr:::arrange.data.frame(summary_table, get(column))
    6. |     \-dplyr:::arrange_rows(.data, dots)
    7. |       +-base::withCallingHandlers(...)
    8. |       +-dplyr::transmute(new_data_frame(.data), !!!quosures)
    9. |       \-dplyr:::transmute.data.frame(new_data_frame(.data), !!!quosures)
   10. |         +-dplyr::mutate(.data, ..., .keep = "none")
   11. |         \-dplyr:::mutate.data.frame(.data, ..., .keep = "none")
   12. |           \-dplyr:::mutate_cols(.data, ...)
   13. |             +-base::withCallingHandlers(...)
   14. |             \-mask$eval_all_mutate(dots[[i]])
   15. +-base::get(column)
   16. +-base::.handleSimpleError(...)
   17. | \-dplyr:::h(simpleError(msg, call))
   18. |   \-rlang::abort(...)
   19. |     \-rlang:::signal_abort(cnd)
   20. |       \-base::signalCondition(cnd)
   21. \-(function (cnd) ...
  
  -- Warning (test-OptimGLM.R:5:3): Test GLM with Australian Credit --------------
  glm.fit: fitted probabilities numerically 0 or 1 occurred
  
  -- Warning (test-OptimGLM.R:5:3): Test GLM with Australian Credit --------------
  glm.fit: fitted probabilities numerically 0 or 1 occurred
  
  7 successful models have been tested and 21 thresholds evaluated 
   
                 Model      rmse Threshold success_rate  ti_error tii_error 
   1   binomial(logit) 0.3011696      1.00    0.5865385 0.4134615         0 
   2  binomial(probit) 0.3016317      1.00    0.5865385 0.4134615         0 
   3 binomial(cloglog) 0.3020186      1.00    0.5865385 0.4134615         0 
   4      poisson(log) 0.3032150      0.95    0.6634615 0.3365385         0 
   5     poisson(sqrt) 0.3063370      0.95    0.6490385 0.3509615         0 
   6          gaussian 0.3109044      0.95    0.6442308 0.3557692         0 
   7           poisson 0.3111360      1.00    0.6153846 0.3846154         0 
  3 successful models have been tested 
   
      Model      rmse threshold success_rate    ti_error tii_error
  1      LM 0.3109044         1    0.5625000 0.009615385 0.4278846
  2 SQRT.LM 0.4516999         1    0.5625000 0.009615385 0.4278846
  3  LOG.LM 1.1762341         1    0.5865385 0.413461538 0.0000000
  3 successful models have been tested 
   
       Model      rmse threshold success_rate    ti_error tii_error 
   1      LM 0.3109044         1    0.5625000 0.009615385 0.4278846 
   2 SQRT.LM 0.4516999         1    0.5625000 0.009615385 0.4278846 
   3  LOG.LM 1.1762341         1    0.5865385 0.413461538 0.0000000 
   [1] "\n"-- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  -- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  -- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  -- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  -- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  -- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  -- Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit --------------
  Some predictor variables are on very different scales: consider rescaling
  
  8 random variables have been tested 
   
    Random_Variable      aic      bic     rmse threshold success_rate   ti_error
  1              X5 495.8364 600.7961 1.023786      1.70    0.8942308 0.08653846
  2              X1 497.6737 628.8733 1.035826      1.60    0.8942308 0.04807692
  3              X6 514.7091 645.9087 1.019398      1.50    0.8653846 0.04807692
  4             X11 524.0760 677.1422 1.016578      1.55    0.8750000 0.04807692
  5              X4 531.7380 684.8042 1.017809      1.30    0.8653846 0.03846154
  6              X9 534.2266 691.6661 1.016536      1.55    0.8750000 0.04807692
  7             X12 536.3424 689.4086 1.016180      1.55    0.8750000 0.04807692
  8              X8 537.4437 694.8833 1.016513      1.55    0.8750000 0.04807692
     tii_error
  1 0.01923077
  2 0.05769231
  3 0.08653846
  4 0.07692308
  5 0.09615385
  6 0.07692308
  7 0.07692308
  8 0.07692308
  8 random variables have been tested 
   
     Random_Variable      aic      bic     rmse threshold success_rate   ti_error 
   1              X5 495.8364 600.7961 1.023786      1.70    0.8942308 0.08653846 
   2              X1 497.6737 628.8733 1.035826      1.60    0.8942308 0.04807692 
   3              X6 514.7091 645.9087 1.019398      1.50    0.8653846 0.04807692 
   4             X11 524.0760 677.1422 1.016578      1.55    0.8750000 0.04807692 
   5              X4 531.7380 684.8042 1.017809      1.30    0.8653846 0.03846154 
   6              X9 534.2266 691.6661 1.016536      1.55    0.8750000 0.04807692 
   7             X12 536.3424 689.4086 1.016180      1.55    0.8750000 0.04807692 
   8              X8 537.4437 694.8833 1.016513      1.55    0.8750000 0.04807692 
      tii_error 
   1 0.01923077 
   2 0.05769231 
   3 0.08653846 
   4 0.07692308 
   5 0.09615385 
   6 0.07692308 
   7 0.07692308 
   8 0.07692308Warning: Thresholds' criteria not selected. The success rate is defined as the default. 
   
  # weights:  37
  initial  value 314.113022 
  iter  10 value 305.860086
  iter  20 value 305.236595
  iter  30 value 305.199531
  final  value 305.199440 
  converged
  # weights:  73
  initial  value 331.204920 
  iter  10 value 277.703814
  iter  20 value 264.464583
  iter  30 value 235.346147
  iter  40 value 213.675019
  iter  50 value 204.512635
  iter  60 value 187.308074
  iter  70 value 147.436155
  iter  80 value 134.805399
  iter  90 value 128.131335
  iter 100 value 127.540544
  final  value 127.539685 
  converged
  # weights:  109
  initial  value 313.022965 
  iter  10 value 293.213546
  iter  20 value 276.666037
  iter  30 value 272.763270
  iter  40 value 271.860014
  iter  50 value 271.852731
  final  value 271.852717 
  converged
  # weights:  145
  initial  value 342.699156 
  iter  10 value 266.493159
  iter  20 value 248.027579
  iter  30 value 202.156187
  iter  40 value 181.633139
  iter  50 value 165.106980
  iter  60 value 146.805052
  iter  70 value 131.481835
  iter  80 value 118.560985
  iter  90 value 113.589950
  iter 100 value 111.521717
  iter 110 value 109.315739
  iter 120 value 108.445079
  iter 130 value 107.625920
  iter 140 value 106.688656
  iter 150 value 105.653618
  iter 160 value 105.376674
  iter 170 value 105.364509
  final  value 105.364086 
  converged
  # weights:  181
  initial  value 431.964891 
  iter  10 value 268.804053
  iter  20 value 257.332978
  iter  30 value 249.853001
  iter  40 value 185.335385
  iter  50 value 153.782864
  iter  60 value 139.784881
  iter  70 value 126.922475
  iter  80 value 123.252145
  iter  90 value 120.348628
  iter 100 value 116.840543
  iter 110 value 112.093661
  iter 120 value 106.440800
  iter 130 value 105.233650
  iter 140 value 105.222728
  final  value 105.198137 
  converged
  # weights:  217
  initial  value 364.112551 
  iter  10 value 274.040840
  iter  20 value 260.171164
  iter  30 value 252.654051
  iter  40 value 245.185007
  iter  50 value 239.105471
  iter  60 value 225.547657
  iter  70 value 208.619569
  iter  80 value 196.251825
  iter  90 value 188.803731
  iter 100 value 187.520201
  iter 110 value 180.509639
  iter 120 value 173.309374
  iter 130 value 162.696568
  iter 140 value 158.906941
  iter 150 value 157.467273
  iter 160 value 157.011874
  iter 170 value 156.566607
  iter 180 value 154.830641
  iter 190 value 154.706559
  iter 200 value 154.475990
  iter 210 value 153.619213
  iter 220 value 149.786054
  iter 230 value 147.795144
  iter 240 value 147.083513
  iter 250 value 145.964459
  iter 260 value 145.865523
  iter 270 value 145.820803
  iter 280 value 145.792567
  iter 290 value 145.721832
  iter 300 value 145.610319
  iter 310 value 145.570264
  iter 320 value 145.522248
  iter 330 value 145.455157
  iter 340 value 145.350623
  iter 350 value 145.244467
  iter 360 value 145.203358
  iter 370 value 145.184359
  iter 380 value 145.176312
  iter 390 value 145.169123
  iter 400 value 145.154012
  iter 410 value 145.147479
  iter 420 value 145.127146
  iter 430 value 145.091879
  iter 440 value 145.074548
  iter 450 value 145.026713
  iter 460 value 145.016682
  iter 470 value 145.010994
  iter 480 value 144.949362
  iter 490 value 144.786727
  iter 500 value 144.760616
  final  value 144.760616 
  stopped after 500 iterations
  6  models have been tested with differents levels of hidden layers 
   
     hiddenlayers      rmse threshold success_rate  ti_error tii_error 
   1            4 0.3236595         1    0.5950413 0.4049587         0 
   2            5 0.3279188         1    0.5950413 0.4049587         0 
   3            2 0.3613537         1    0.5950413 0.4049587         0 
   4            6 0.4056531         1    0.5950413 0.4049587         0 
   5            3 0.4793713         1    0.5950413 0.4049587         0 
   6            1 0.5048849         1    0.5950413 0.4049587         06 successful models have been tested 
   
    hiddenlayers      rmse threshold success_rate  ti_error tii_error
  1            4 0.3236595         1    0.5950413 0.4049587         0
  2            5 0.3279188         1    0.5950413 0.4049587         0
  3            2 0.3613537         1    0.5950413 0.4049587         0
  4            6 0.4056531         1    0.5950413 0.4049587         0
  5            3 0.4793713         1    0.5950413 0.4049587         0
  6            1 0.5048849         1    0.5950413 0.4049587         0
  4 successful kernels have been tested 
   
        Kernels      rmse threshold success_rate   ti_error  tii_error 
   1     radial 0.3351234      1.75    0.8745981 0.05787781 0.06752412 
   2     linear 0.3517729      1.20    0.8617363 0.03536977 0.10289389 
   3    sigmoid 0.4044390      1.30    0.8617363 0.04180064 0.09646302 
   4 polynomial 0.5285653      1.15    0.8360129 0.10932476 0.054662384 successful models have been tested 
   
       Kernels      rmse threshold success_rate   ti_error  tii_error
  1     radial 0.3351234      1.75    0.8745981 0.05787781 0.06752412
  2     linear 0.3517729      1.20    0.8617363 0.03536977 0.10289389
  3    sigmoid 0.4044390      1.30    0.8617363 0.04180064 0.09646302
  4 polynomial 0.5285653      1.15    0.8360129 0.10932476 0.05466238
  == testthat results  ===========================================================
  ERROR (test-OptimDA.R:4:3): Test DA methods with Australian Credit
  Warning (test-OptimGLM.R:5:3): Test GLM with Australian Credit
  Warning (test-OptimGLM.R:5:3): Test GLM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  Warning (test-OptimLMM.R:5:3): Test LMM with Australian Credit
  
  [ FAIL 1 | WARN 9 | SKIP 0 | PASS 12 ]
  Error: Test failures
  Execution halted