Description Usage Arguments Value Author(s) Examples
Creates a network based on the moin_network function and combines the adjacency matrix with the cultural distance matrix.
1 2 3 4 |
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. |
network_method |
type of model graph to be produced, either a Maximum Distance Model ("mdm"), a Proximal Point Analysis ("ppa") or a full graph as base for a Intervening Opportunity Model ("iom"); defaults to "iom" i.e. a full graph. |
par |
an integer indicating the distance threshold value D for method "mdm" and the neighbour rank k for "ppa" . |
mode |
a character string; default is undirected. Directed networks are not supported! |
crs |
coordinate reference system: integer with the EPSG code, or character with proj4string. |
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. |
coords_x |
a character string; defines the column name of the X-coordinate in case input is a data.frame; Defaults to NA. |
coords_y |
a character string; defines the column name of the Y-coordinate in case input is a data.frame; Defaults to NA. |
a list containing a graph object of classes tidygraph ("tbl_graph") resp. igraph ("igraph") and the cultural distance matrix.
Wolfgang Hamer <hamer@geographie.uni-kiel.de>
Chiara Girotto <chiara.girotto@web.de>
Hendrik Raese <h.raese@ufg.uni-kiel.de>
Carolin Tietze <ctietze1991@yahoo.com>
Michael Bilger <sofnod@googlemail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | # Example mdm network
set.seed(1234)
moin_cult_network(
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, network_method ="mdm",
par = 50000, mode = "undirected", crs = NA)
# Example ppa network
set.seed(1234)
moin_cult_network(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,network_method ="ppa",
par = 3, mode = "undirected", crs = NA)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.