Description Usage Arguments Details Value Author(s) Examples
Cultural distance Network
1 2 | moin_cult_dist(nodes_x, nodes_y, nodes_id, features, type_col,
pre_size = 1, method = "euclidean", plotted = FALSE)
|
nodes_x |
a vector containing metric x coordinates of nodes |
nodes_y |
a vector containing metric y coordinates of nodes |
nodes_id |
a vector containing ID for nodes |
features |
a data.frame containing metric x and y coordinates of features, and feature type. Coordinates are expected to be the first two columns. |
type_col |
a character string naming the columname containing feature types. |
pre_size |
numeric, amount of letters, e.g. characters before typenumbers. Defaults to 1. |
method |
character string, the distance measure to be used ("euclidean", "maximum", "manhattan", "canberra", "binary" or "minkowski"). Defaults to euclidean distance. |
plotted |
a Boolean operator defining whether a plot should be created. Defaults to FALSE. Edge widths are scaled by maximum distance values and enlarged by factor 2. |
Creates a network based on a cultural distance matrix
a list containing a graph object of classes tidygraph ("tbl_graph") resp. igraph ("igraph") and the cultural distance matrix. NOTE: The output igraph object contains zeros for display purpose. The cultural distance matrix (cult_dist_matr) is correct, containing NA for missing values.
Wolfgang Hamer <hamer@geographie.uni-kiel.de>
Chiara Girotto <chiara.girotto@web.de>
Hendrik Raese <h.raese@ufg.uni-kiel.de>
Georg Roth <georg.roth@fu-berlin.de>
1 2 3 4 5 6 7 8 9 10 11 12 | set.seed(1234)
moin_cult_dist(nodes_x=sample(3433806:3581396, 10, replace = TRUE),
nodes_y=sample(5286004:5484972, 10, replace = TRUE),
nodes_id=c(1:10),
features=data.frame(x=sample(3433806:3581396, 100, replace = TRUE),
y=sample(5286004:5484972, 100, replace = TRUE),
type=paste0("B", c(rep(1, 5), rep(2,15), sample(11:19, 20, replace = TRUE),
sample(111:119, 30, replace = TRUE), sample(1111:1115, 30, replace = TRUE)))
),
type_col="type" , pre_size=1, method = "euclidean", plotted = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.