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

> ### Name: axe-pls
> ### Title: Axing mixOmics models
> ### Aliases: axe-pls axe-mixo_pls axe_call.mixo_pls axe_call.mixo_spls
> ###   axe_data.mixo_pls axe_data.mixo_spls axe_fitted.mixo_pls
> ###   axe_fitted.mixo_spls
> 
> ### ** Examples
> 
> ## Don't show: 
> if (rlang::is_installed("mixOmics")) (if (getRversion() >= "3.4") withAutoprint else force)({ # examplesIf
+ ## End(Don't show)
+ library(butcher)
+ do.call(library, list(package = "mixOmics"))
+ 
+ # pls ------------------------------------------------------------------
+ fit_mod <- function() {
+   boop <- runif(1e6)
+   pls(matrix(rnorm(2e4), ncol = 2), rnorm(1e4), mode = "classic")
+ }
+ 
+ mod_fit <- fit_mod()
+ mod_res <- butcher(mod_fit)
+ 
+ weigh(mod_fit)
+ weigh(mod_res)
+ 
+ new_data <- matrix(1:2, ncol = 2)
+ colnames(new_data) <- c("X1", "X2")
+ predict(mod_fit, new_data)
+ predict(mod_res, new_data)
+ ## Don't show: 
+ }) # examplesIf
> library(butcher)
> do.call(library, list(package = "mixOmics"))
Loading required package: MASS
Loading required package: lattice
Loading required package: ggplot2

Loaded mixOmics 6.19.1
Thank you for using mixOmics!
Tutorials: http://mixomics.org
Bookdown vignette: https://mixomicsteam.github.io/Bookdown
Questions, issues: Follow the prompts at http://mixomics.org/contact-us
Cite us:  citation('mixOmics')

> fit_mod <- function() {
+     boop <- runif(1e+06)
+     pls(matrix(rnorm(20000), ncol = 2), rnorm(10000), mode = "classic")
+ }
> mod_fit <- fit_mod()
> mod_res <- butcher(mod_fit)
> weigh(mod_fit)
# A tibble: 24 × 2
   object             size
   <chr>             <dbl>
 1 X              0.842   
 2 Y              0.762   
 3 names.sample   0.681   
 4 variates.X     0.201   
 5 variates.Y     0.201   
 6 input.X        0.161   
 7 call           0.00129 
 8 loadings.X     0.000776
 9 loadings.Y     0.000696
10 loadings.star1 0.0006  
# ℹ 14 more rows
> weigh(mod_res)
# A tibble: 24 × 2
   object              size
   <chr>              <dbl>
 1 X               0.842   
 2 Y               0.762   
 3 variates.X      0.201   
 4 variates.Y      0.201   
 5 loadings.X      0.000776
 6 loadings.Y      0.000696
 7 loadings.star1  0.0006  
 8 mat.c           0.0006  
 9 loadings.star2  0.00052 
10 prop_expl_var.X 0.000352
# ℹ 14 more rows
> new_data <- matrix(1:2, ncol = 2)
> colnames(new_data) <- c("X1", "X2")
> predict(mod_fit, new_data)
Error in is(object, c("rgcca", "sparse.rgcca")) : 
  length(class2) == 1L is not TRUE
Calls: <Anonymous> ... eval -> predict -> predict.mixo_pls -> is -> stopifnot
Execution halted