Query sf attributes from the active element of an sfnetwork object
sf_attr(x, name = NULL, active = NULL)sf_attr(x, name, active = NULL) <- value
An object of class sfnetwork
.
Name of the attribute to query. If NULL
, then all sf
attributes are returned in a list. Defaults to NULL
.
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
.
The new value of the attribute, or NULL
to remove the
attribute.
For the extractor: a list of attributes if name
is NULL
,
otherwise the value of the attribute matched, or NULL if no exact match is
found and no or more than one partial match is found.
sf attributes include sf_column
(the name of the sf column)
and agr
(the attribute-geometry-relationships).