find_no_clusters: find_no_clusters

Description Usage Arguments Value Examples

View source: R/0c_find_no_clusters.R

Description

Helps identify how many regions should be divided by analyzing the changes in modularity value

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
find_no_clusters(
  x,
  queen = TRUE,
  similarity.measure = "euclidean",
  data = -grep(names(x), pattern = "^geom"),
  style = "B",
  n.neigh = 8,
  disjoint = FALSE,
  range = 2:30
)

Arguments

x

spatial data for regionalization

queen

if data is polygon and without disjoint polygons, should the neighborhood be treated by queen topology or rook topology

similarity.measure

Character or function to declare distance method transformed into similarity measure. If method is character, method must be "mahalanobis" or "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowisk". If method is one of "euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski", see dist for details, because this function as used to compute the distance. If method="mahalanobis", the mahalanobis distance is computed between neighbor areas. If method is a function, this function is used to compute the distance.

data

data to analyze similarity between regions

style

style can take values “W”, “B”, “C”, “U”, “minmax” and “S”

n.neigh

number of neighbors considered in the k-nearest neighbor algorithm that builds topology

disjoint

if default settings generate error occurring to disjoint subgraphs it means, that in some places points or polygons are to disjoint to generate one connected graph. Use disjoint = T to enforce that one graph will be created. This is a slower option.

range

number of divisions to test the modularity. THe bigger the numbers, the longer it will take to calculate plot

Value

A vector of modularity measures for given range of divisions

Examples

1
2
3
data(realEstate)
realEstate.modularity <- find_no_clusters(realEstate)
plot_modularity(realEstate.modularity)

dabrowskia/dspace documentation built on July 3, 2020, 8:47 p.m.