Description Usage Arguments Value Examples
SKATER forms clusters by spatially partitioning data that has similar values for features of interest.
1 2 3 4 5 6 7 8 9 10 |
k |
The number of clusters |
w |
An instance of Weight class |
data |
A list of numeric vectors of selected variable |
bound_vals |
(optional) A 1-d vector of selected bounding variable |
min_bound |
(optional) A minimum value that the sum value of bounding variable int each cluster should be greater than |
distance_method |
(optional) The distance method used to compute the distance betwen observation i and j. Defaults to "euclidean". Options are "euclidean" and "manhattan" |
random_seed |
(int,optional) The seed for random number generator. Defaults to 123456789. |
cpu_threads |
(optional) The number of cpu threads used for parallel computation |
A list of numeric vectors represents a group of clusters
1 2 3 4 5 6 7 | 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
data <- guerry_df[c('Crm_prs','Crm_prp','Litercy','Donatns','Infants','Suicids')]
guerry_clusters <- skater(4, queen_w, data)
guerry_clusters
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.