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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: boot_predict
> ### Title: Bootstrap simulation for model prediction
> ### Aliases: boot_predict
> 
> ### ** Examples
> 
> library(finalfit)
> library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

> 
> # Predict probability of death across combinations of factor levels
> explanatory = c("age.factor", "extent.factor", "perfor.factor")
> dependent = 'mort_5yr'
> 
> # Generate combination of factor levels
> colon_s %>%
+   finalfit_newdata(explanatory = explanatory, newdata = list(
+     c("<40 years",  "Submucosa", "No"),
+     c("<40 years", "Submucosa", "Yes"),
+     c("<40 years", "Adjacent structures", "No"),
+     c("<40 years", "Adjacent structures", "Yes")
+    )) -> newdata
> 
> # Run simulation
> colon_s %>%
+   glmmulti(dependent, explanatory) %>%
+   boot_predict(newdata, estimate_name = "Predicted probability of death",
+     compare_name = "Absolute risk difference", R=100, digits = c(2,3))
        Age    Extent of spread Perforation Predicted probability of death
1 <40 years           Submucosa          No            0.28 (0.00 to 0.52)
2 <40 years           Submucosa         Yes            0.29 (0.00 to 0.57)
3 <40 years Adjacent structures          No            0.71 (0.52 to 0.86)
4 <40 years Adjacent structures         Yes            0.72 (0.39 to 0.89)
       Absolute risk difference
1                             -
2 0.00 (-0.12 to 0.19, p=0.920)
3  0.45 (0.17 to 0.72, p<0.001)
4  0.44 (0.10 to 0.77, p=0.020)
> 
> # Plotting
> explanatory = c("nodes", "extent.factor", "perfor.factor")
> colon_s %>%
+   finalfit_newdata(explanatory = explanatory, rowwise = FALSE, newdata = list(
+   rep(seq(0, 30), 4),
+   c(rep("Muscle", 62), rep("Adjacent structures", 62)),
+   c(rep("No", 31), rep("Yes", 31), rep("No", 31), rep("Yes", 31))
+ )) -> newdata
> 
> colon_s %>%
+   glmmulti(dependent, explanatory) %>%
+   boot_predict(newdata, boot_compare = FALSE, R=100, condense=FALSE) -> plot
> 
>   library(ggplot2)
>   theme_set(theme_bw())
>   plot %>%
+     ggplot(aes(x = nodes, y = estimate, ymin = estimate_conf.low,
+         ymax = estimate_conf.high, fill=extent.factor))+
+       geom_line(aes(colour = extent.factor))+
+       geom_ribbon(alpha=0.1)+
+       facet_grid(.~perfor.factor)+
+       xlab("Number of postive lymph nodes")+
+       ylab("Probability of death")+
+       labs(fill = "Extent of tumour", colour = "Extent of tumour")+
+       ggtitle("Probability of death by lymph node count")
Error in Summary.unit(c(4.4, 4.4), na.rm = FALSE) : 
  VECTOR_ELT() can only be applied to a 'list', not a 'double'
Calls: <Anonymous> ... render_strips -> build_strip -> ggstrip -> Summary.unit
Execution halted