This function takes a data frame of links and creates the respective nodes dataframe.

get_nodes_from_links(Links, source = "source", target = "target")

Arguments

Links

A data frame containing links information.

source

The name of the column in the Links data frame that contains the source nodes. Default is "source".

target

The name of the column in the Links data frame that contains the target nodes. Default is "target".

Value

A data frame of unique nodes.

Examples

links <- data.frame(source = c("A", "B", "C"), target = c("B", "C", "A"))
get_nodes_from_links(links)
#>   NodeID
#> 1      A
#> 2      B
#> 3      C