How to write a dataframe, graph to pajek format?
问题 I Would like to save a igraph graph or a dataframe to pajek format. So I have used the igraph package to create graph object and then used this write.graph(graph_activitynetwork,"layer_share","pajek") to write the igraph graph in pajek .but what I am wondering is to create it in customized format :like this : *Vertices 4 1 "Node 1" 2 "Node 2" 3 "Node 3" 4 "Node 4" *Multiplex # layer node layer node [weight] 1 1 1 2 2 1 1 2 2 1 1 2 1 1 1 now I could just have this format : *Vertices 4 1 "1" 2