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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: update.rma
> ### Title: Model Updating for 'rma' Objects
> ### Aliases: update update.rma
> ### Keywords: models
> 
> ### ** Examples
> 
> ### calculate log risk ratios and corresponding sampling variances
> dat <- escalc(measure="RR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg)
> 
> ### fit random-effects model (method="REML" is default)
> res <- rma(yi, vi, data=dat, digits=3)
> res

Random-Effects Model (k = 13; tau^2 estimator: REML)

tau^2 (estimated amount of total heterogeneity): 0.313 (SE = 0.166)
tau (square root of estimated tau^2 value):      0.560
I^2 (total heterogeneity / total variability):   92.22%
H^2 (total variability / sampling variability):  12.86

Test for Heterogeneity:
Q(df = 12) = 152.233, p-val < .001

Model Results:

estimate     se    zval   pval   ci.lb   ci.ub      
  -0.715  0.180  -3.974  <.001  -1.067  -0.362  *** 

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> 
> ### fit mixed-effects model with two moderators (absolute latitude and publication year)
> res <- update(res, ~ ablat + year)
> res

Mixed-Effects Model (k = 13; tau^2 estimator: REML)

tau^2 (estimated amount of residual heterogeneity):     0.111 (SE = 0.084)
tau (square root of estimated tau^2 value):             0.333
I^2 (residual heterogeneity / unaccounted variability): 71.98%
H^2 (unaccounted variability / sampling variability):   3.57
R^2 (amount of heterogeneity accounted for):            64.63%

Test for Residual Heterogeneity:
QE(df = 10) = 28.325, p-val = 0.002

Test of Moderators (coefficients 2:3):
QM(df = 2) = 12.204, p-val = 0.002

Model Results:

         estimate      se    zval   pval    ci.lb   ci.ub     
intrcpt    -3.546  29.096  -0.122  0.903  -60.572  53.481     
ablat      -0.028   0.010  -2.737  0.006   -0.048  -0.008  ** 
year        0.002   0.015   0.130  0.897   -0.027   0.031     

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> 
> ### remove 'year' moderator
> res <- update(res, ~ . - year)
> res

Mixed-Effects Model (k = 13; tau^2 estimator: REML)

tau^2 (estimated amount of residual heterogeneity):     0.076 (SE = 0.059)
tau (square root of estimated tau^2 value):             0.276
I^2 (residual heterogeneity / unaccounted variability): 68.39%
H^2 (unaccounted variability / sampling variability):   3.16
R^2 (amount of heterogeneity accounted for):            75.62%

Test for Residual Heterogeneity:
QE(df = 11) = 30.733, p-val = 0.001

Test of Moderators (coefficient 2):
QM(df = 1) = 16.357, p-val < .001

Model Results:

         estimate     se    zval   pval   ci.lb   ci.ub      
intrcpt     0.251  0.249   1.009  0.313  -0.237   0.740      
ablat      -0.029  0.007  -4.044  <.001  -0.043  -0.015  *** 

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> 
> ### fit model with ML estimation
> update(res, method="ML")

Mixed-Effects Model (k = 13; tau^2 estimator: ML)

tau^2 (estimated amount of residual heterogeneity):     0.034 (SE = 0.028)
tau (square root of estimated tau^2 value):             0.185
I^2 (residual heterogeneity / unaccounted variability): 49.33%
H^2 (unaccounted variability / sampling variability):   1.97
R^2 (amount of heterogeneity accounted for):            87.73%

Test for Residual Heterogeneity:
QE(df = 11) = 30.733, p-val = 0.001

Test of Moderators (coefficient 2):
QM(df = 1) = 28.911, p-val < .001

Model Results:

         estimate     se    zval   pval   ci.lb   ci.ub      
intrcpt     0.282  0.187   1.507  0.132  -0.085   0.649      
ablat      -0.030  0.005  -5.377  <.001  -0.040  -0.019  *** 

---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

> 
> ### example with rma.glmm()
> res <- rma.glmm(measure="OR", ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg, digits=3)
Error in rma.glmm(measure = "OR", ai = tpos, bi = tneg, ci = cpos, di = cneg,  : 
  Please install the 'lme4' package to fit this model.
Execution halted