graph_plan {graph4lg} | R Documentation |
Create a graph with a minimum planar graph topology
Description
The function constructs a graph with a minimum planar graph topology
Usage
graph_plan(crds, ID = NULL, x = NULL, y = NULL, weight = TRUE)
Arguments
crds |
A
|
ID |
A character string indicating the name of the column
of |
x |
A character string indicating the name of the column
of |
y |
A character string indicating the name of the column
of |
weight |
A character string indicating whether the links of the graph are weighted by Euclidean distances (TRUE)(default) or not (FALSE). When the graph links do not have weights in Euclidean distances, each link is given a weight of 1. |
Details
A delaunay triangulation is performed in order to get the planar graph.
Value
A planar graph of class igraph
Author(s)
P. Savary
Examples
data(pts_pop_ex)
g_plan <- graph_plan(crds = pts_pop_ex,
ID = "ID",
x = "x",
y = "y")