if (mlr3misc::require_namespaces(c("sf"), quietly = TRUE)) {
library(mlr3)
library(mlr3spatiotempcv)
task = tsk("ecuador")
resampling = rsmp("spcv_coords")
resampling$instantiate(task)
autoplot(resampling, task) +
ggplot2::scale_x_continuous(breaks = seq(-79.085, -79.055, 0.01))
autoplot(resampling, task, fold_id = 1)
autoplot(resampling, task, fold_id = c(1, 2)) *
ggplot2::scale_x_continuous(breaks = seq(-79.085, -79.055, 0.01))
}
Run the code above in your browser using DataLab