MK_RMCentrality doesn't works with raster files
Opened this issue · 0 comments
FVFaleiro commented
Hello, I have tried use the MK_RMCentrality with raster data and it is not working. Below I show a test and error message.
- What is the raster format used in Makurhini (raster or terra package)?
- Is there another function to get the clusters based on distance thresholds?
library(Makurhini)
# raster_vegetation_patches object from the package
centrality_test_r <- MK_RMCentrality(nodes = raster_vegetation_patches,
distance = list(type = "centroid"),
distance_thresholds = c(100, 100000),
probability = 0.05,
write = NULL)
# message: Error in .local(x, ...) : invalid layer names
# the same with vector data works fine
centrality_test_v <- MK_RMCentrality(nodes = vegetation_patches,
distance = list(type = "centroid"),
distance_thresholds = c(100, 100000),
probability = 0.05,
write = NULL)
centrality_test_v