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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ClusterMF
> ### Title: Clustered MetaForest analysis for dependent data.
> ### Aliases: ClusterMF
> 
> ### ** Examples
> 
> #Load and clean data from metafor
> data <- get(data(dat.bourassa1996))
> data <- escalc(measure = "OR", ai = lh.le, bi = lh.re, ci = rh.le, di= rh.re,
+                data = data, add = 1/2, to = "all")
> data$mage[is.na(data$mage)] <- median(data$mage, na.rm = TRUE)
> data[c(5:8)] <- lapply(data[c(5:8)], factor)
> data$yi <- as.numeric(data$yi)
> mf.cluster.b1996 <- ClusterMF(formula = yi~ selection + investigator +
+                               hand_assess + eye_assess + mage +sex,
+                               data, study = "sample",
+                               whichweights = "unif", num.trees = 300)
> #Print MetaForest object
> mf.cluster.b1996
Call:
ClusterMF(formula = yi ~ selection + investigator + hand_assess + 
    eye_assess + mage + sex, data = data, study = "sample", whichweights = "unif", 
    num.trees = 300)

R squared (OOB):                  -0.0616 
Residual heterogeneity (tau2):    0.3680 
> #Check convergence plot
> plot(mf.cluster.b1996)
> #Check summary
> summary(mf.cluster.b1996, digits = 4)
MetaForest results
                                                         
Type of analysis:              ClusterMF                 
Number of studies:             Forest 1: 39, Forest 2: 57
Number of moderators:          6                         
Number of trees in forest:     Two forests of length 300 
Candidate variables per split: 2                         
Minimum terminal node size:    5                         
OOB prediction error (MSE):    0.9074                    
R squared (OOB):               -0.0616                   

Tests for Heterogeneity: 
                               tau2   tau2_SE I^2     H^2    Q-test   df Q_p   
Raw effect sizes:              0.4096 0.0894  86.5418 7.4304 561.0564 95 0.0000
Residuals (after MetaForest):  0.3680 0.0824  85.2455 6.7776 379.6980 95 0.0000


Random intercept meta-analyses:
                               Intercept se     ci.lb   ci.ub  p     
Raw effect sizes:              1.3075    0.0825 1.1457  1.4693 0.0000
Residuals (after MetaForest):  0.0744    0.0795 -0.0814 0.2302 0.3494
> #Check variable importance plot
> VarImpPlot(mf.cluster.b1996)
> #Univariate partial dependence plot
> PartialDependence(mf.cluster.b1996, vars = "eye_assess")
Error in !"id" : invalid argument type
Calls: PartialDependence ... cartesianExpand -> [ -> [.data.table -> eval -> eval
Execution halted