Running examples in ‘horserule-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: HorseRuleFit
> ### Title: Horseshoe RuleFit
> ### Aliases: HorseRuleFit
> 
> ### ** Examples
> 
> library(MASS)
> library(horserule)
> data(Boston)
> # Split in train and test data
> N = nrow(Boston)
> train = sample(1:N, 400)
> Xtrain = Boston[train,-14]
> ytrain = Boston[train, 14]
> Xtest = Boston[-train, -14]
> ytest = Boston[-train, 14]
> 
> # Run the HorseRuleFit with 100 trees
> # Increase Number of trees and the number of posterior samples for better modelfit
> hrres = HorseRuleFit(X = Xtrain, y=ytrain,
+                     thin=1, niter=100, burnin=10,
+                     L=5, S=6, ensemble = "both", mix=0.3, ntree=100,
+                     intercept=FALSE, linterms=1:13, ytransform = "log",
+                     alpha=1, beta=2, linp = 1, restricted = 0)
> 
> # Calculate the error
> pred = predict(hrres, Xtest, burnin=100, postmean=TRUE)
> sqrt(mean((pred-ytest)^2))
[1] NaN
> 
> # Look at the most important rules/linear effects.
> importance_hs(hrres)
                                            Rule    2.5% Imp   50% Imp
1                                    X[,13]>9.95 0.041878593 1.0000000
2                                     Linear:X 9 0.076034976 0.6578474
3                                    Linear:X 10 0.155855719 0.4251897
4     X[,5]<=0.618 & X[,6]<=6.979 & X[,13]<=9.95 0.003888217 0.3835799
5                                  X[,5]<=0.6695 0.006689407 0.3562882
6                   X[,1]>11.48635 & X[,5]>0.675 0.105305786 0.2973831
7                                     Linear:X 8 0.094299044 0.2439945
8  X[,1]<=0.866645 & X[,13]>9.95 & X[,13]<=19.23 0.096479939 0.2350775
9                                     Linear:X 7 0.074771284 0.2228479
10                                   Linear:X 11 0.031735359 0.2226646
   97.5% Imp          bhat
1  1.0000000 -0.1473482626
2  1.0000000  0.0058868578
3  0.6893198 -0.0001866582
4  0.9828923 -0.0665426762
5  0.8728290  0.0671124385
6  0.6419671 -0.1093820039
7  0.5578155 -0.0096745857
8  0.5501539  0.0450713975
9  0.5268873 -0.0006463655
10 0.4733963 -0.0079654487
> 
> # Look at the input variable importance.
> Variable_importance(hrres, var_names=colnames(Xtrain))
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... lapply -> FUN -> push.vp.viewport -> grid.Call.graphics
Execution halted