node_get_nbs | R Documentation |
Given a tidygraph object, create a list column of edge data for each node in the node context.
node_get_nbs()
node_get_edge_list()
node_get_edge_col(edges, .var)
edges |
an edge list as created by |
.var |
the quoted name of a column in the edge context. |
node_get_nbs()
: creates a neighbor list in the nodes context based on the adjacency list. This returns a nb
class object with the neighboring nodes.
Uses igraph::get.adjlist()
node_get_edge_list()
: creates an edge list. The edge list contains the row index of the edge relationships in the edge context for each node.
Uses igraph::get.adjedgelist()
.
node_get_edge_col()
: creates a list column containing edge attributes as a list column in the node context (much like find_xj()
).
Uses igraph::get.edge.attribute()
A list column
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")
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.