library(sf)
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- st_read(guerry_path)
queen_w <- queen_weights(guerry)
lisa <- local_joincount(queen_w, guerry['TopCrm'])
clsts<- lisa_clusters(lisa)
clsts
Run the code above in your browser using DataLab