node_get_nbs {sfdep}R Documentation

Create node features from edges

Description

Given a tidygraph object, create a list column of edge data for each node in the node context.

Usage

node_get_nbs()

node_get_edge_list()

node_get_edge_col(edges, .var)

Arguments

edges

an edge list as created by node_get_edge_list()

.var

the quoted name of a column in the edge context.

Details

Value

A list column

Examples


if (interactive()) {
  net <- sfnetworks::as_sfnetwork(
    sfnetworks::roxel
  )

  dplyr::mutate(
    net,
    nb = node_get_nbs(),
    edges = node_get_edge_list(),
    types = node_get_edge_col(edges, "type")
  )
}

[Package sfdep version 0.2.4 Index]