sg2igraph: Map a SpatialGraph into an igraph

View source: R/sg2igraph.R

sg2igraphR 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

SpatialGraph

directed

whether the resulting igraph is directed

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


SpatialGraph documentation built on Sept. 28, 2023, 5:08 p.m.