This function extracts the neighborhood of each node as a graph and maps over
each of these neighborhood graphs. Conceptually it is similar to
igraph::local_scan(), but it borrows the type safe versions available in
1 2 3 4 5 6 7 8 9
map_local(order = 1, mode = "all", mindist = 0, .f, ...) map_local_lgl(order = 1, mode = "all", mindist = 0, .f, ...) map_local_chr(order = 1, mode = "all", mindist = 0, .f, ...) map_local_int(order = 1, mode = "all", mindist = 0, .f, ...) map_local_dbl(order = 1, mode = "all", mindist = 0, .f, ...)
Integer giving the order of the neighborhood.
Character constant, it specifies how to use the direction of
the edges if a directed graph is analyzed. For ‘out’ only the
outgoing edges are followed, so all vertices reachable from the source
vertex in at most
The minimum distance to include the vertex in the result.
A function to map over all nodes. See Details
Additional parameters to pass to
The function provided to
.f will be called with the following arguments in
addition to those supplied through
neighborhood: The neighborhood graph of the node
graph: The full
node: The index of the node currently mapped over
map_local() returns a list of the same length as the number of
nodes in the graph, in the order matching the node order in the graph.
map_local_*() tries to coerce its result into a vector of the classes
map_local_dbl). These functions will throw
an error if they are unsuccesful, so they are type safe.
1 2 3 4 5 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.