Running examples in 'arulesCBA-Ex.R' failed
The error most likely occurred in:

> ### Name: RCAR
> ### Title: Regularized Class Association Rules for Multi-class Problems
> ###   (RCAR+)
> ### Aliases: RCAR rcar
> 
> ### ** Examples
> 
> data("iris")
> 
> classifier <- RCAR(Species~., iris)
> classifier
CBA Classifier Object
Class: 
Default Class: NA
Number of rules: 9
Classification method: logit  
Description: RCAR+ based on RCAR (Azmi et al., 2019)

> 
> # inspect the rule base sorted by the larges class weight
> inspect(sort(rules(classifier), by = "weight"))
    lhs                           rhs                    support confidence     lift count       weight oddsratio
[1] {Petal.Length=[-Inf,2.45)} => {Species=setosa}     0.3333333  1.0000000 3.000000    50 3.932345e+00 51.026488
[2] {Petal.Width=[0.8,1.75)}   => {Species=versicolor} 0.3266667  0.9074074 2.722222    49 2.175177e+00  8.803743
[3] {Petal.Length=[4.75, Inf]} => {Species=virginica}  0.3266667  0.8909091 2.672727    49 1.936672e+00  6.935628
[4] {Petal.Length=[2.45,4.75)} => {Species=versicolor} 0.2933333  0.9777778 2.933333    44 5.537206e-01  1.739714
[5] {Sepal.Length=[6.15, Inf],                                                                                   
     Petal.Width=[1.75, Inf]}  => {Species=virginica}  0.2466667  1.0000000 3.000000    37 5.327466e-01  1.703605
[6] {Petal.Width=[1.75, Inf]}  => {Species=virginica}  0.3000000  0.9782609 2.934783    45 3.582109e-01  1.430767
[7] {Sepal.Length=[6.15, Inf],                                                                                   
     Petal.Length=[4.75, Inf],                                                                                   
     Petal.Width=[1.75, Inf]}  => {Species=virginica}  0.2466667  1.0000000 3.000000    37 3.670022e-02  1.037382
[8] {Petal.Length=[-Inf,2.45),                                                                                   
     Petal.Width=[-Inf,0.8)}   => {Species=setosa}     0.3333333  1.0000000 3.000000    50 2.655090e-02  1.026907
[9] {Petal.Width=[-Inf,0.8)}   => {Species=setosa}     0.3333333  1.0000000 3.000000    50 1.152876e-15  1.000000
> 
> # make predictions for the first few instances of iris
> predict(classifier, head(iris))
[1] setosa setosa setosa setosa setosa setosa
Levels: setosa versicolor virginica
> 
> # inspecting the regression model and the cross-validation results to determine lambda
> str(classifier$model$reg_model)
List of 15
 $ a0        : num [1:3, 1] -0.401 0.195 0.206
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr [1:3] "setosa" "versicolor" "virginica"
  .. ..$ : chr "s0"
 $ beta      :List of 3
  ..$ setosa    :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
  .. .. ..@ i       : int [1:3] 4 5 23
  .. .. ..@ p       : int [1:2] 0 3
  .. .. ..@ Dim     : int [1:2] 55 1
  .. .. ..@ Dimnames:List of 2
  .. .. .. ..$ : chr [1:55] "{Sepal.Length=[5.55,6.15)}" "{Sepal.Width=[3.35, Inf]}" "{Petal.Length=[2.45,4.75)}" "{Petal.Width=[1.75, Inf]}" ...
  .. .. .. ..$ : chr "s0"
  .. .. ..@ x       : num [1:3] 3.93 1.15e-15 2.66e-02
  .. .. ..@ factors : list()
  ..$ versicolor:Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
  .. .. ..@ i       : int [1:2] 2 7
  .. .. ..@ p       : int [1:2] 0 2
  .. .. ..@ Dim     : int [1:2] 55 1
  .. .. ..@ Dimnames:List of 2
  .. .. .. ..$ : chr [1:55] "{Sepal.Length=[5.55,6.15)}" "{Sepal.Width=[3.35, Inf]}" "{Petal.Length=[2.45,4.75)}" "{Petal.Width=[1.75, Inf]}" ...
  .. .. .. ..$ : chr "s0"
  .. .. ..@ x       : num [1:2] 0.554 2.175
  .. .. ..@ factors : list()
  ..$ virginica :Formal class 'dgCMatrix' [package "Matrix"] with 6 slots
  .. .. ..@ i       : int [1:4] 3 10 19 42
  .. .. ..@ p       : int [1:2] 0 4
  .. .. ..@ Dim     : int [1:2] 55 1
  .. .. ..@ Dimnames:List of 2
  .. .. .. ..$ : chr [1:55] "{Sepal.Length=[5.55,6.15)}" "{Sepal.Width=[3.35, Inf]}" "{Petal.Length=[2.45,4.75)}" "{Petal.Width=[1.75, Inf]}" ...
  .. .. .. ..$ : chr "s0"
  .. .. ..@ x       : num [1:4] 0.3582 1.9367 0.5327 0.0367
  .. .. ..@ factors : list()
 $ dfmat     : num [1:3, 1] 3 2 4
  ..- attr(*, "dimnames")=List of 2
  .. ..$ : chr [1:3] "setosa" "versicolor" "virginica"
  .. ..$ : chr "s0"
 $ df        : int 9
 $ dim       : int [1:2] 55 1
 $ lambda    : num 0.0461
 $ dev.ratio : num 0.856
 $ nulldev   : num 330
 $ npasses   : int 356
 $ jerr      : int 0
 $ offset    : logi FALSE
 $ classnames: chr [1:3] "setosa" "versicolor" "virginica"
 $ grouped   : logi FALSE
 $ call      : language (function (x, y, family = c("gaussian", "binomial", "poisson", "multinomial",      "cox", "mgaussian"), weights, | __truncated__ ...
 $ nobs      : int 150
 - attr(*, "class")= chr [1:2] "multnet" "glmnet"
> plot(classifier$model$cv)
> 
> # show progress report and use 5 instead of the default 10 cross-validation folds.
> classifier <- RCAR(Species~., iris, cv.glmnet.args = list(nfolds = 5), verbose = TRUE)
* Mining CARs...
Apriori

Parameter specification:
 confidence minval smax arem  aval originalSupport maxtime support minlen
        0.5    0.1    1 none FALSE            TRUE       5     0.1      1
 maxlen target   ext
      5  rules FALSE

Algorithmic control:
 filter tree heap memopt load sort verbose
    0.1 TRUE TRUE  FALSE TRUE    2    TRUE

Absolute minimum support count: 15 

set item appearances ...[15 item(s)] done [0.00s].
set transactions ...[15 item(s), 150 transaction(s)] done [0.00s].
sorting and recoding items ... [15 item(s)] done [0.00s].
creating transaction tree ... done [0.00s].
checking subsets of size 1 2 3 4 5 done [0.00s].
writing ... [55 rule(s)] done [0.00s].
creating S4 object  ... done [0.00s].
* Creating model matrix
* Determine lambda using cross-validation: Error in glmnet(x, y, weights = weights, offset = offset, lambda = lambda,  : 
  unused argument (trace.it = TRUE)
Calls: RCAR -> do.call -> <Anonymous>
Execution halted