as_igraph: Convert osmar object to igraph

Description Usage Arguments Value Examples

View source: R/as-igraph.R

Description

Convert an osmar object to an igraph (see igraph-package).

Usage

1
as_igraph(obj)

Arguments

obj

An osmar object

Value

An igraph-package graph object

Examples

1
2
3
4
file <- system.file("extdata", "kaufstr.xml", package = "osmar")
raw <- readLines(file)
kaufstr <- as_osmar(xmlParse(raw))
kaufstrGraph <- as_igraph(kaufstr)

Example output

Loading required package: XML
Loading required package: RCurl
Loading required package: bitops
Loading required package: geosphere
Loading required package: sp

Attaching package: 'osmar'

The following object is masked from 'package:utils':

    find

Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

osmar documentation built on May 2, 2019, 6:15 p.m.

Related to as_igraph in osmar...