不推荐使用igraph0软件包,因此无法访问gspan软件包 [英] Package igraph0 deprecated and hence not able to access gspan package

查看:62
本文介绍了不推荐使用igraph0软件包,因此无法访问gspan软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试从书中摘录一些示例:使用R 进行子图挖掘的实用图挖掘:

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%")

出现以下错误:

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

这可能是因为igraph0已弃用.因此,我们是否需要调整subgraphMining包中的函数以在R中使用gspan?还是有其他方法可以指出R将igraph0更新为igraph

解决方案

igraph0 not 更新为igraph,因此您不应该这样做. igraph0igraph之间的主要区别(除了igraph0已经过时的事实)是igraph0使用基于0的顶点和边索引,而igraph使用基于1的索引.简单地使用igraph代替igraph0是行不通的,因为依赖于igraph0 expect 顶点索引的软件包从零开始.

唯一明智的解决方案是让仍然依赖igraph0的软件包的维护者升级到igraph.或者,您可以从存档中获取igraph0.. >

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

解决方案

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.

这篇关于不推荐使用igraph0软件包,因此无法访问gspan软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆