Running examples in 'voluModel-Ex.R' failed
The error most likely occurred in:

> ### Name: MESS3D
> ### Title: Calculate MESS
> ### Aliases: MESS3D
> ### Keywords: modelDiagnostics
> 
> ### ** Examples
> 
> library(terra)
terra 1.9.27
> library(dplyr)

Attaching package: 'dplyr'

The following objects are masked from 'package:terra':

    intersect, union

The following objects are masked from 'package:stats':

    filter, lag

The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union

> 
> # Create sample rasterBricks
> r1 <- rast(ncol=10, nrow=10)
> values(r1) <- 1:100
> r2 <- rast(ncol=10, nrow=10)
> values(r2) <- c(rep(20, times = 50), rep(60, times = 50))
> r3 <- rast(ncol=10, nrow=10)
> values(r3) <- 8
> envBrick1 <- c(r1, r2, r3)
> names(envBrick1) <- c(0, 10, 30)
> 
> r1 <- rast(ncol=10, nrow=10)
> values(r1) <- 100:1
> r2 <- rast(ncol=10, nrow=10)
> values(r2) <- c(rep(10, times = 50), rep(20, times = 50))
> r3 <- rast(ncol=10, nrow=10)
> values(r3) <- c(rep(c(10,20,30,25), times = 25))
> envBrick2 <- c(r1, r2, r3)
> names(envBrick2) <- c(0, 10, 30)
> 
> rastList <- list("temperature" = envBrick1, "salinity" = envBrick2)
> 
> # Create test reference set
> set.seed(0)
> longitude <- sample(ext(envBrick1)[1]:ext(envBrick1)[2],
+                     size = 10, replace = FALSE)
> set.seed(0)
> latitude <- sample(ext(envBrick1)[3]:ext(envBrick1)[4],
+                    size = 10, replace = FALSE)
> set.seed(0)
> depth <- sample(0:35, size = 10, replace = TRUE)
> occurrences <- as.data.frame(cbind(longitude,latitude,depth))
> 
> # Calibration
> calibration <- lapply(rastList, FUN = function(x) xyzSample(occurrences, x)) %>% bind_rows
Using longitude, latitude, and depth
 as x, y, and z coordinates, respectively.
Using longitude, latitude, and depth
 as x, y, and z coordinates, respectively.
> 
> # Run the function
> messStack <- MESS3D(calibration = calibration, projection = rastList)
Error in MESS(P = projVals, V = cal, verbosity = 0) : 
  The number of variables in V and P does not match.
Calls: MESS3D -> MESS
Execution halted