library(stars)
landcover = read_stars(system.file("raster/landcover2015s.tif", package = "motif"))
landcover_coma = lsp_signature(landcover, type = "coma", threshold = 0.9, window = 100)
selected_coma = subset(landcover_coma, id %in% c(5, 10, 15, 35))
selected_coma
selected_coma = lsp_add_examples(x = selected_coma, y = landcover)
selected_coma
plot(selected_coma$region[[1]])
plot(selected_coma$region[[4]])
# \donttest{
# larger data example
library(stars)
landcover = read_stars(system.file("raster/landcover2015.tif", package = "motif"))
landcover_coma = lsp_signature(landcover, type = "coma", threshold = 0.9, window = 100)
selected_coma = subset(landcover_coma, id %in% c(5, 80, 1971, 2048))
selected_coma
selected_coma = lsp_add_examples(x = selected_coma, y = landcover)
selected_coma
plot(selected_coma$region[[1]])
plot(selected_coma$region[[4]])
# }
Run the code above in your browser using DataLab