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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: balance
> ### Title: Balance checking for causal mediation analysis in multisite
> ###   trials
> ### Aliases: balance
> 
> ### ** Examples
> 
> data(sim.weights)
> 
> balance(data = sim.weights, y = "y", treatment = "tr", mediator = "me", response = "R", 
+     XR1 = c("x1", "x2", "x3"), XR0 = c("x1", "x2", "x3"), XM1 = c("x1", "x2", "x3"), 
+     XM0 = c("x1", "x2", "x3"), X = c("x1", "x2", "x3"), site = "site")
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
boundary (singular) fit: see ?isSingular
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
Warning: Ignoring unknown aesthetics: x
$balance.R
$balance.R$balance1
       balance.mean balance.sd balance.lower balance.upper
x1            0.156      0.148        -0.135         0.447
x2            0.050      0.312        -0.561         0.660
x3            0.522      0.307        -0.080         1.125
logitp        0.633      0.351        -0.055         1.321

$balance.R$balance1.adj
       balance.mean balance.sd balance.lower balance.upper
x1            0.013      0.031        -0.047         0.073
x2            0.032      0.232        -0.423         0.487
x3            0.102      0.358        -0.600         0.804
logitp        0.158      0.350        -0.529         0.845

$balance.R$balance0
       balance.mean balance.sd balance.lower balance.upper
x1           -0.255      0.392        -1.024         0.514
x2            0.157      0.096        -0.031         0.346
x3            0.391      0.020         0.352         0.430
logitp        0.509      0.183         0.150         0.867

$balance.R$balance0.adj
       balance.mean balance.sd balance.lower balance.upper
x1           -0.004      0.465        -0.916         0.907
x2            0.050      0.097        -0.140         0.241
x3            0.034      0.158        -0.277         0.344
logitp        0.072      0.095        -0.115         0.258


$balance.M
$balance.M$balance1
       balance.mean balance.sd balance.lower balance.upper
x1            0.560      0.735        -0.880         2.001
x2            0.261      0.393        -0.510         1.032
x3            0.165      0.420        -0.658         0.987
logitp        0.642      0.539        -0.414         1.697

$balance.M$balance1.adj
       balance.mean balance.sd balance.lower balance.upper
x1            0.199      0.747        -1.265         1.663
x2            0.049      0.378        -0.691         0.789
x3            0.041      0.495        -0.928         1.010
logitp        0.218      0.531        -0.822         1.258

$balance.M$balance0
       balance.mean balance.sd balance.lower balance.upper
x1            0.212      0.146        -0.075         0.499
x2           -0.086      0.306        -0.686         0.514
x3            0.059      0.264        -0.458         0.576
logitp        0.262      0.006         0.251         0.274

$balance.M$balance0.adj
       balance.mean balance.sd balance.lower balance.upper
x1           -0.003      0.165        -0.326         0.321
x2            0.011      0.298        -0.574         0.595
x3           -0.018      0.237        -0.482         0.446
logitp        0.016      0.018        -0.020         0.052


$plot.balance.R.1
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