rnetwork-programminggraph-modelling-language

How to convert csv file containing network data into GML


I have a dataset containing network data of email conversations consisting of two columns representing the connections between agents.

The dataset can be accessed from here

Since I'm using igraph in R I would like to convert this file to GML format.

Is there any way to do this?


Solution

  • Hope that helps.

    library(igraph)
    my.data <- read.delim(url("http://dl.dropbox.com/u/22681355/email.csv"), sep = '')
    my.graph <- graph.data.frame(d = my.data, directed = FALSE)
    write.graph(graph = my.graph, file = 'email.gml', format = 'gml')