0

I'm trying to read a graph ml file in r using the i graph package.

The code I'm using is the following

g<-read.graph("graph_bustuberail_london_500m",format=c("graphml")) #import gml

I get the following error message Error in .Call("R_igraph_read_graph_graphml", file, as.numeric(index), : At rinterface.c:5866 : Cannot open GraphML file, File operation error

Not sure why this is not loading in, can anyone help me?

  • `Cannot open GraphML file, File operation error` is the file in the current directory? Is the file actually named "graph_bustuberail_london_500m.gml" (with the file extension)? – G5W Jun 14 '18 at 23:27
  • Yeah I've managed to solve this by manipulating the code ever so slightly - still unsure as to why the original wasn't working. – Michael Montgomery Jun 16 '18 at 11:21
  • g_L<-read_graph("graph_bustuberail_london_500m.graphml",format="graphml") – Michael Montgomery Jun 16 '18 at 11:21

1 Answers1

0

Igraph is not very informative regarding certain types of error it displays: I have found that many times the above error is caused by simply a misspelling in the filename.

As a consequence I suggest you to start by checking that you have written the file extension correctly, i.e. with .gml ending and not with .glm.

gibbone
  • 2,300
  • 20
  • 20