# NOT RUN {
guerry_path <- system.file("extdata", "Guerry.shp", package = "rgeoda")
guerry <- geoda_open(guerry_path)
queen_w <- queen_weights(guerry)
guerry_df <- as.data.frame(guerry) # use as data.frame
top_crm <- guerry_df['TopCrm'][,1] # get 0/1 values of variable "top_crm"
lisa <- local_joincount(queen_w, top_crm)
clsts<- lisa_clusters(lisa)
clsts
# }
Run the code above in your browser using DataLab