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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: fortify.perry
> ### Title: Convert resampling-based prediction error results into a data
> ###   frame for plotting
> ### Aliases: fortify.perry fortify.perrySelect fortify.perryTuning
> ### Keywords: utilities
> 
> ### ** Examples
> 
> data("coleman")
> set.seed(1234)  # set seed for reproducibility
> 
> ## set up folds for cross-validation
> folds <- cvFolds(nrow(coleman), K = 5, R = 10)
> 
> ## compare LS, MM and LTS regression
> 
> # perform cross-validation for an LS regression model
> fitLm <- lm(Y ~ ., data = coleman)
> cvLm <- perry(fitLm, splits = folds, 
+     cost = rtmspe, trim = 0.1)
> 
> # perform cross-validation for an MM regression model
> fitLmrob <- lmrob(Y ~ ., data = coleman, k.max = 500)
> cvLmrob <- perry(fitLmrob, splits = folds, 
+     cost = rtmspe, trim = 0.1)
Warning in lmrob.S(x, y, control = control) :
  find_scale() did not converge in 'maxit.scale' (= 200) iterations with tol=1e-10, last rel.diff=0
Warning in lmrob.S(x, y, control = control) :
  find_scale() did not converge in 'maxit.scale' (= 200) iterations with tol=1e-10, last rel.diff=0
Warning in lmrob.S(x, y, control = control) :
  find_scale() did not converge in 'maxit.scale' (= 200) iterations with tol=1e-10, last rel.diff=0
> 
> # perform cross-validation for an LTS regression model
> fitLts <- ltsReg(Y ~ ., data = coleman)
> cvLts <- perry(fitLts, splits = folds, 
+     cost = rtmspe, trim = 0.1)
> 
> # combine results into one object
> cv <- perrySelect(LS = cvLm, MM = cvLmrob, LTS = cvLts)
> cv

5-fold CV results:
  Fit       PE
1  LS 1.775811
2  MM 1.023272
3 LTS 1.165749

Best model:
  PE 
"MM" 
> 
> ## convert MM regression results to data frame for plotting
> # all replications for box plot
> cvLmrobBox <- fortify(cvLmrob, reps = TRUE)
> perryPlot(cvLmrobBox)
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