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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: plot_predict
> ### Title: Prediction intervals for walker object
> ### Aliases: plot_predict
> 
> ### ** Examples
> 
> set.seed(1)
> n <- 60
> slope <- 0.0001 + cumsum(rnorm(n, 0, sd = 0.01))
> beta <- numeric(n)
> beta[1] <- 1
> for(i in 2:n) beta[i] <- beta[i-1] + slope[i-1]
> ts.plot(beta)                
> x <- rnorm(n, 1, 0.5)
> alpha <- 2
> ts.plot(beta * x)
> 
> signal <- alpha + beta * x
> y <- rnorm(n, signal, 0.25)
> ts.plot(cbind(signal, y), col = 1:2)
> data_old <- data.frame(y = y[1:(n-10)], x = x[1:(n-10)])
> rw2_fit <- walker(y ~ 1 + 
+                     rw2(~ -1 + x,
+                         beta_prior = c(0, 10), 
+                         sigma_prior = c(0, 10), 
+                         slope_prior = c(0, 10)), 
+                   sigma_y_prior = c(0, 10), 
+                   beta_prior = c(0, 10),
+                   iter = 400, chains = 1, data = data_old)

SAMPLING FOR MODEL 'walker_lm' NOW (CHAIN 1).
Chain 1: 
Chain 1: Gradient evaluation took 0.000602 seconds
Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 6.02 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.909459 seconds (Warm-up)
Chain 1:                0.517 seconds (Sampling)
Chain 1:                1.42646 seconds (Total)
Chain 1: 
> 
> pred <- predict(rw2_fit, newdata = data.frame(x=x[(n-9):n]))
> data_new <- data.frame(t = (n-9):n, y = y[(n-9):n])
> plot_predict(pred) + 
+   geom_line(data=data_new, aes(t, y), linetype="dashed", colour = "red", inherit.aes = FALSE)
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