Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

take node names from nodes to edges tidygraph

your_tbl_graph %>% 
  activate(edges) %>% 
  mutate(to_name = .N()$name[to], 
         from_name = .N()$name[from]) %>% 
  as_tibble() %>% 
  select(from = from_name, to = to_name, weight)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #node #names #nodes #edges #tidygraph
ADD COMMENT
Topic
Name
1+8 =