Learn R Programming

rgeoda (version 0.0.6)

lisa_clusters: Get local cluster indicators

Description

Get the local cluster indicators returned from LISA computation.

Usage

lisa_clusters(gda_lisa, cutoff = 0.05)

Arguments

gda_lisa

An instance of LISA object

cutoff

A value of cutoff for significance p-values to filter not-significant clusters, default=0.05

Value

A numeric vector of LISA cluster indicator

Examples

Run this code
# 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
crm_prs <- guerry_df['Crm_prs'][,1] # get values of variable "crm_prs"
lisa <- local_moran(queen_w, crm_prs)
clsts <- lisa_clusters(lisa)
clsts
# }

Run the code above in your browser using DataLab