# \donttest{
if (mlr3misc::require_namespaces(c("sf", "blockCV"), quietly = TRUE)) {
task = as_task_classif_st(ecuador,
target = "slides",
positive = "TRUE", coordinate_names = c("x", "y")
)
# passing objects of class 'sf' is also supported
data_sf = sf::st_as_sf(ecuador, coords = c("x", "y"))
task = as_task_classif_st(data_sf, target = "slides", positive = "TRUE")
task$task_type
task$formula()
task$class_names
task$positive
task$negative
task$coordinates()
task$coordinate_names
}
# }
Run the code above in your browser using DataLab