无法构建R项目

时间:2017-03-02 13:50:47

标签: r lazy-loading rstudio cran

我在Windows 10上使用 igraph&em>和 statnet 库在RStudio(版本1.0.136)中构建R项目,并调用一个数字在R函数中使用.C()的C函数。

此输出的构建失败:

* installing to library 'C:/Users/Joanna/Documents/R/win-library/3.3'  
* installing *source* package 'cycleanalysis' ...  
** libs  
make: Nothing to be done for `all'.  
installing to C:/Users/Joanna/Documents/R/win-library/3.3/cycleanalysis/libs/x64  
** R  
** preparing package for lazy loading   
unable to reach CRAN  
Error in .C("cycleCensusID_R", as.integer(dat), as.integer(n), as.integer(NROW(dat)),  : 
  "cycleCensusID_R" not available for .C() for package "cycleanalysis"
Error : unable to load R code in package 'cycleanalysis'
ERROR: lazy loading failed for package 'cycleanalysis'
* removing 'C:/Users/Joanna/Documents/R/win-library/3.3/cycleanalysis'

Exited with status 1.

我的代码设置是R函数kcycle.censusExtended()调用C函数cycleCensusID_R(),如下所示:

#Calculate the cycle information
ccen<-.C("cycleCensusID_R",as.integer(dat), as.integer(n), as.integer(NROW(dat)), count=as.double(count), cccount=as.double(cccount), as.integer(maxlen), as.integer(directed), as.integer(tabulate.by.vertex), as.integer(cocycles), PACKAGE="cycleanalysis")

在Rstudio的控制台中运行时,如下所示,这是我收到的错误:

cc <- kcycle.censusExtension(adjacencyMat, maxlen = 5, tabulate.by.vertex = FALSE, cycle.comembership = "bylength")
Error in .C("cycleCensusID_R", as.integer(dat), as.integer(n), as.integer(NROW(dat)),  : 
  "cycleCensusID_R" not available for .C() for package "cycleanalysis"

知道为什么我可能会收到这些错误或者我如何解决这些错误?

0 个答案:

没有答案