user1723765
user1723765

Reputation: 6399

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?

Upvotes: 4

Views: 4481

Answers (1)

Andrej
Andrej

Reputation: 3839

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')

Upvotes: 8

Related Questions