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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: pp_check.stanreg
> ### Title: Graphical posterior predictive checks
> ### Aliases: pp_check.stanreg pp_check
> 
> ### ** Examples
> 
> fit <- stan_glmer(mpg ~ wt + am + (1|cyl), data = mtcars, 
+                   iter = 400, chains = 2) # just to keep example quick

SAMPLING FOR MODEL 'continuous' NOW (CHAIN 1).
Chain 1: 
Chain 1: Gradient evaluation took 5.3e-05 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.53 seconds.
Chain 1: Adjust your expectations accordingly!
Chain 1: 
Chain 1: 
Chain 1: Iteration:   1 / 400 [  0%]  (Warmup)
Chain 1: Iteration:  40 / 400 [ 10%]  (Warmup)
Chain 1: Iteration:  80 / 400 [ 20%]  (Warmup)
Chain 1: Iteration: 120 / 400 [ 30%]  (Warmup)
Chain 1: Iteration: 160 / 400 [ 40%]  (Warmup)
Chain 1: Iteration: 200 / 400 [ 50%]  (Warmup)
Chain 1: Iteration: 201 / 400 [ 50%]  (Sampling)
Chain 1: Iteration: 240 / 400 [ 60%]  (Sampling)
Chain 1: Iteration: 280 / 400 [ 70%]  (Sampling)
Chain 1: Iteration: 320 / 400 [ 80%]  (Sampling)
Chain 1: Iteration: 360 / 400 [ 90%]  (Sampling)
Chain 1: Iteration: 400 / 400 [100%]  (Sampling)
Chain 1: 
Chain 1:  Elapsed Time: 0.186475 seconds (Warm-up)
Chain 1:                0.120542 seconds (Sampling)
Chain 1:                0.307017 seconds (Total)
Chain 1: 

SAMPLING FOR MODEL 'continuous' NOW (CHAIN 2).
Chain 2: 
Chain 2: Gradient evaluation took 2.4e-05 seconds
Chain 2: 1000 transitions using 10 leapfrog steps per transition would take 0.24 seconds.
Chain 2: Adjust your expectations accordingly!
Chain 2: 
Chain 2: 
Chain 2: Iteration:   1 / 400 [  0%]  (Warmup)
Chain 2: Iteration:  40 / 400 [ 10%]  (Warmup)
Chain 2: Iteration:  80 / 400 [ 20%]  (Warmup)
Chain 2: Iteration: 120 / 400 [ 30%]  (Warmup)
Chain 2: Iteration: 160 / 400 [ 40%]  (Warmup)
Chain 2: Iteration: 200 / 400 [ 50%]  (Warmup)
Chain 2: Iteration: 201 / 400 [ 50%]  (Sampling)
Chain 2: Iteration: 240 / 400 [ 60%]  (Sampling)
Chain 2: Iteration: 280 / 400 [ 70%]  (Sampling)
Chain 2: Iteration: 320 / 400 [ 80%]  (Sampling)
Chain 2: Iteration: 360 / 400 [ 90%]  (Sampling)
Chain 2: Iteration: 400 / 400 [100%]  (Sampling)
Chain 2: 
Chain 2:  Elapsed Time: 0.16957 seconds (Warm-up)
Chain 2:                0.077088 seconds (Sampling)
Chain 2:                0.246658 seconds (Total)
Chain 2: 
> 
> # Compare distribution of y to distributions of multiple yrep datasets
> pp_check(fit)
Error in grid.Call.graphics(C_setviewport, vp, TRUE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... push.vp.vpTree -> push.vp -> push.vp.viewport -> grid.Call.graphics
Execution halted