igraph Error could not find function “hist”

我们两清 提交于 2020-01-25 02:51:09

问题


I am using RStudio Version 0.98.484 and R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" on a Mac OSX 10.6.8.

here is an example of a code:

a  <- "a"
b  <- "b"
c  <- "c"
d  <- "d"
e  <- "e"
f  <- "f"

model1 <- ug(~a:b, ~a:c:d,~b:c,~a:c:d:f,~d:e:f,~b:f)
model1 <- as(model1, "igraph")

applying the functions:

cluster.distribution() #or
degree.distribution()

returns the error:

Error in cluster.distribution() : could not find function "hist"
Error in degree.distribution() : could not find function "hist"

Now i found this:

https://github.com/igraph/igraph/issues/257 with the following: https://github.com/igraph/igraph/commit/0567c2694a99686bbd1855299822ad52dcd5989a slution.

But the problem seems to be different, since it is the hist() function that is not working under my 3.0.2 R version and not the "$intensities".

I downloaded the latest version of the igraph package from here: https://code.google.com/p/igraph/downloads/detail?name=igraph_nightly_0.7-f8164af-20131004.tar.gz&can=2&q=

however when I try to install it in the Terminal using: R CMD INSTALL ~/Downloads/igraph_0.7.tar.gz

the following error message comes up:

* installing to library ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’
* installing *source* package ‘igraph’ ...
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 144: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 145: make: command not found
/Library/Frameworks/R.framework/Resources/bin/config: line 259: make: command not found
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/private/var/folders/B-/B-vij4PvG1K9q1Uv2RID9k+++TI/-Tmp-/RtmpU3N8GA/R.INSTALL3a66344bc5d4/igraph':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
ERROR: configuration failed for package ‘igraph’
* removing ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/igraph’
* restoring previous ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library/igraph’

来源:https://stackoverflow.com/questions/21251097/igraph-error-could-not-find-function-hist

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!