data: Extract the node or edge data from a spatial network

dataR Documentation

Extract the node or edge data from a spatial network

Description

Extract the node or edge data from a spatial network

Usage

node_data(x, focused = TRUE)

edge_data(x, focused = TRUE, require_sf = FALSE)

Arguments

x

An object of class sfnetwork.

focused

Should only features that are in focus be extracted? Defaults to TRUE. See focus for more information on focused networks.

require_sf

Is an sf object required? This will make extraction of edge data fail if the edges are spatially implicit. Defaults to FALSE.

Value

For the nodes, always an object of class sf. For the edges, an object of class sf if the edges are spatially explicit, and an object of class tibble if the edges are spatially implicity and require_sf = FALSE.

Examples

net = as_sfnetwork(roxel[1:10, ])
node_data(net)
edge_data(net)


luukvdmeer/sfnetworks documentation built on Nov. 21, 2024, 4:54 a.m.