View source: R/get-neighbor-list.R
get_neighbor_list | R Documentation |
For a given edge list, construct a nested list (i.e., dictionary of dictionaries in Python syntax)
of the neighbors of each node in the edge list stratified by type. This reference object can be
used instead of the edge list in subsequent metapaths
functions, since searching the edge list
to recompute neighbors each time would have O(n)
complexity, while searching a pre-computed neighbors
dictionary requires a fixed amount of time.
get_neighbor_list(
edge_list,
file_path = NULL,
intermediate_file_path = NULL,
verbose = F
)
edge_list |
Edge list as a
|
file_path |
File path to save final |
intermediate_file_path |
File path to save intermediate list of lists reference object. If no path is specified, the intermediate reference object is not saved. |
verbose |
Should node types and total node count be printed to the console? |
Neighbors reference object as a data.table
mtcars_neighbor_list = get_neighbor_list(mtcars_edge_list, verbose = T)
head(mtcars_neighbor_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.