Description Usage Arguments Value
View source: R/1b_ds_polygon.R
ds_polygon
Creates a vector of community assignment based on neighboring polygons. It creates a topological structure in which nodes represent polygons and the edge is the similarity between nodes. Communities are created using fast greedy algorithm that maximizes their modularity.
1 2 3 4 5 6 7 8 9 10 11 12 |
x |
point or polygon shapefile data; |
k |
number of clusters; |
queen |
if TRUE, a single shared boundary point meets the contiguity condition, if FALSE, more than one shared point is required; note that more than one shared boundary point does not necessarily mean a shared boundary line |
data |
attributes of the spatial data frame to calculate similarity or distance measure; |
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 "minkowski". 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. |
style |
style can take values “W”, “B”, “C”, “U”, “minmax” and “S” |
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. |
n.neigh |
number of neighbors considered in the k-nearest neighbor algorithm that builds topology |
plot |
should the neighborhood be plotted |
explain |
logical. If TRUE a machine learning (randomForest using 5 fold cross validation) model is being constructed based on the data provided for regionalization. The accuracy of this model explains how much of the regionalization can be attributed to the data and how much to the spatial distribution. |
vector of numbers representing regions to which each element belongs to
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.