source_gpkg <- system.file("extdata", "clc.gpkg", package = "clc")
clo <- clc(source = source_gpkg, layer_name = "clc")
polygon <- sf::st_read(source_gpkg, layer = 'lanjaron', quiet = TRUE)
clo2 <- clo |>
cut_to_extent(polygon)
Run the code above in your browser using DataLab