ox_as_tidygraph: Convert to a 'tidygraph' table graph

View source: R/interop.R

ox_as_tidygraphR Documentation

Convert to a tidygraph table graph

Description

Returns the graph as a tidygraph::tbl_graph(), dropping geometry (node coordinates are kept as x/y columns).

Usage

ox_as_tidygraph(g, directed = TRUE)

Arguments

g

An osm_graph.

directed

Build a directed graph. Default TRUE.

Value

A tbl_graph.

Examples


g <- example_osm_graph()
ox_as_tidygraph(g)


osmnxr documentation built on Oct. 20, 2026, 1:07 a.m.