Learn R Programming

sfnetworks (version 0.3.1)

sf_attr: Query sf attributes from the active element of an sfnetwork object

Description

Query sf attributes from the active element of an sfnetwork object

Usage

sf_attr(x, name = NULL, active = NULL)

sf_attr(x, name, active = NULL) <- value

Arguments

x

An object of class sfnetwork.

name

Name of the attribute to query. If NULL, then all sf attributes are returned in a list. Defaults to NULL.

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 new value of the attribute, or NULL to remove the attribute.

Value

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.

Details

sf attributes include sf_column (the name of the sf column) and agr (the attribute-geometry-relationships).