Make spatially constrained clusters from spatially non-constrained clusters using the contiguity information from the input weights
make_spatial(clusters, w)
A vector of categorical values (cluster classification)
if (FALSE) { # \dontrun{
library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
data <- guerry[c('Crm_prs','Crm_prp','Litercy','Donatns','Infants','Suicids')]
clusters <- kmeans(5, data)
queen_w <- queen_weights(guerry)
results <- make_spatial(clusters, queen_w)
results
} # }