我对igraph包进行了一些小改动,想要安装这个更改过的包。但我之前已经在计算机上安装了原始igraph包。这两个包具有相同的名称。
我尝试将描述文件中的名称从 igraph 更改为 igraphmy 。但它没有用。如错误所示:
Error : .onLoad failed in loadNamespace() for 'igraphmy', details:
call: library.dynam("igraph", pkgname, libname, local = FALSE)
error: DLL 'igraph' not found: maybe not installed for this architecture?
答案 0 :(得分:4)
igraph
包中包含C和其他非R代码。当您进行安装或从CRAN(Mac和Windows)下载预编译的二进制文件时,此代码要么编译(如果您在Linux上)。这些C和C ++函数通过.Call
与R连接。 R函数.Call
包括包名igraph
作为参数。那么当你加载试试igraphmy
时会发生什么情况并且失败,因为它无法在igraph
包中找到它想要的函数,因为igraph
不是现有的包。尝试加载igraph
然后加载igraphmy
或修改DESCRIPTION
以说明igraphmy
取决于igraph
并使用语法igraphmy::foo
来使用{ {1}}函数的版本和igraphmy
版本的igraph::foo
。