sf_attr: Query sf attributes from the active element of a sfnetwork

View source: R/attrs.R

sf_attrR Documentation

Query sf attributes from the active element of a sfnetwork

Description

Query sf attributes from the active element of a sfnetwork

Usage

sf_attr(x, name, active = NULL)

Arguments

x

An object of class sfnetwork.

name

Name of the attribute to query. Either 'sf_column' to extract the name of the geometry list column, or 'agr' to extract the specification of attribute-geometry relationships.

active

Which network element (i.e. nodes or edges) to activate before extracting. If NULL, it will be set to the current active element of the given network. Defaults to NULL.

Value

The value of the queried attribute.

Examples

net = as_sfnetwork(roxel)
sf_attr(net, "agr", active = "edges")
sf_attr(net, "sf_column", active = "nodes")


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