4

Hi am trying some examples from the book: Practical Graph mining with R for subgraph mining:

library(subgraphMining)
library(igraph)

graph1 = graph.ring(5)
graph2 = graph.ring(6)

database <- array(dim=2)
database[1] <- list(graph1)
database[2] <- list(graph2)

result <- gspan(database, support= "80%")

Getting the following error:

Error in library(igraph0) : there is no package called ‘igraph0’

This is probably because igraph0 is deprecated. So, do we need to tweak the functions in the subgraphMining package for using gspan in R; or is there any other way where I can point out to R that igraph0 is updated to igraph

1
  • I tried it. But it doesn't seem to work
    – KarthikS
    Oct 21, 2015 at 20:57

1 Answer 1

2

igraph0 is not updated to igraph so you shouldn't do that. The key difference between igraph0 and igraph (apart from the fact that igraph0 is way outdated) is that igraph0 uses 0-based vertex and edge indices, while igraph uses 1-based indices. Simply using igraph in place of igraph0 won't work because packages depending on igraph0 expect vertex indices to start at zero.

The only sensible solution is to ask the maintainers of packages that still depend on igraph0 to upgrade to igraph. Alternatively, you can get igraph0 from the archives.

3
  • Thanks, I will try that. I used a third party C compiled program and got outputs desired. But I wished to do it in R itself. Thanks.
    – KarthikS
    Oct 25, 2015 at 19:33
  • 1
    @Earnest_learner I am an R user facing the same problem as you did. Could you please expand on how you ran the C implementation of gspan? You could consider posting it as an answer.
    – Antoine
    Nov 1, 2015 at 18:25
  • Well, I didn't use it in R. I took the data out and used another competing algorithm for subgraph mining called as 'Grami' (refer the authors' paper here and their C Code can be downloaded from their github page
    – KarthikS
    Nov 1, 2015 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.