understanding the morph/unmorph feature in tidygraph

Hello there,

I am struggling to understand what morph does in tidygraph.

Consider the example in the manual https://www.rdocumentation.org/packages/tidygraph/versions/1.1.2/topics/morph


create_notable('meredith') %>%
        mutate(group = group_infomap()) %>%
        morph(to_contracted, group) %>% 
        crystallise()
[[1]]
# A tbl_graph: 10 nodes and 15 edges
#
# An undirected simple graph with 1 component
#
# Node Data: 10 x 3 (active)
  group .orig_data       .tidygraph_node_index
  <int> <list>           <list>               
1     3 <tibble [7 x 0]> <int [7]>            
2     9 <tibble [7 x 0]> <int [7]>            
3     4 <tibble [7 x 0]> <int [7]>            
4     5 <tibble [7 x 0]> <int [7]>            
5    10 <tibble [7 x 0]> <int [7]>            
6     6 <tibble [7 x 0]> <int [7]>            
# ? with 4 more rows
#
# Edge Data: 15 x 4
   from    to .tidygraph_edge_index .orig_data      
  <int> <int> <list>                <list>          
1     1     6 <int [1]>             <tibble [1 x 2]>
2     1     7 <int [1]>             <tibble [1 x 2]>
3     1    10 <int [2]>             <tibble [2 x 2]>
# ? with 12 more rows

I dont understand what is going on here? Are the nodes somehow grouped together? How are the edges aggregated then?

Thanks!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.