sg2igraph {SpatialGraph} | R Documentation |
Map a SpatialGraph into an igraph
Description
The vertex and edge information in a SpatialGraph
is
mapped into an igraph
object
Usage
sg2igraph(sg, directed=FALSE)
Arguments
sg |
|
directed |
whether the resulting |
Details
It is assumed that the SpatialGraph
, used as input, is correct
(i.e.g all records in sg@e@data
have the two first field correctly
identifying the field 'ID' in sg@v
. It is also assumed that the
sg@e@data
data.frame has the fields div
and
len
. These two are highly useful to conduct network operations
on the resulting igraph
Value
An igraph
[Package SpatialGraph version 1.0-4 Index]