我已阅读 RGraphviz 页面上的 README 并查看了 R 帮助列表和此处的许多问题,但我仍然找不到无法在 R 2.14.0 上安装 Rgraphviz 包的原因。
我已经下载并安装了 Graphviz 2.20.3(虽然开始菜单显示它是 2.21)
我已将 Graphviz bin 文件夹添加到我的用户路径中。
strsplit(Sys.getenv("PATH"), ";") [[1]] [1] "C:\Program Files\R\R-2.14.0\bin\x64"
[2] "C:\Program Files\Common Files\Microsoft Shared\Windows Live"
[3] "C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live"
[4] "C:\Windows\system32"
[5] "C: \Windows"
[6] "C:\Windows\System32\Wbem"
[7] "C:\Windows\System32\WindowsPowerShell\v1.0\"
[8] "C:\Program Files\Intel\WiFi\bin\ "
[9] "C:\Program Files\Common Files\Intel\WirelessCommon\"
[10] "C:\Program Files\Intel\DMIX"
[11] "C:\Program Files (x86)\NTRU Cryptosystems\NTRU TCG 软件堆栈\bin\"
[12] "C:\Program Files\NTRU Cryptosystems\NTRU TCG 软件栈\bin\"
[13] "C:\Program Files (x86)\Intel\Services\IPT\"
[14] "C:\Program Files\Dell\Dell Data Protection\Access\Advanced\Wave\Gemalto\Access Client\v5\" [15] "C:\Program Files (x86)\Windows Live\Shared"
[16] "c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\"
[17] "c:\Program Files\Microsoft SQL Server\100\Tools\Binn\"
[18] "c:\Program Files\Microsoft SQL Server\100\DTS\Binn\"
[19] "C:\Program Files (x86)\Graphviz2.20 \bin"使用 bioconductor 安装 Rgraphviz 包。
source("http://bioconductor.org/biocLite.R") biocLite("Rgraphviz") BioC_mirror: 'http://www.bioconductor.org' 使用 R 版本 2.14,BiocInstaller 版本 1.2.1。安装包“Rgraphviz”将包安装到“C:/Users/Abraham/R/win-library/2.14”(因为“lib”未指定)尝试 URL 'http://www.bioconductor.org /packages/2.9/bioc/bin/windows/contrib/2.14/Rgraphviz_1.32.0.zip' 内容类型 'application/zip' 长度 933734 字节 (911 Kb) 打开 URL 下载 911 Kb
包 'Rgraphviz' 成功解包并检查了 MD5 和
下载的包位于 C:\Users\Abraham\AppData\Local\Temp\RtmpYNFDxs\downloaded_packages 警告信息:'boot' 无法更新,安装目录 'C:/Program Files/R/R-2.14.0/library' not writeable 'class' 无法更新,安装目录 'C:/Program Files/R/R-2.14.0/library' not writeable 'cluster' 无法更新,安装目录 'C:/Program Files/R/R- 2.14.0/library'不可写'foreign'无法更新,安装目录'C:/Program Files/R/R-2.14.0/library'不可写'KernSmooth'无法更新,安装目录'C:/Program Files/R/R-2.14.0/library'不可写'lattice'无法更新,安装目录'C:/Program Files/R/R-2.14.0/library'不可写'MASS'无法更新,安装目录'C:/Program Files/R/R-2.14.0/library'不可写'Matrix'无法更新,安装目录'C:/Program Files/R/R-2.14.0/library'不可写' mgcv'无法更新,安装目录'C:/Program Files/R/R-2.14.0/library'不可写'nlme'无法更新,安装目录'C:/Program Files/R/R-2.14.0 /library'不可写'n [...截断]不可写'n [...截断]不可写'n [...截断]
现在它表明 Rgraphviz 已成功解包。但是,当我尝试使用库导入包时,我收到一条错误消息。
> library("Rgraphviz")
Error : .onLoad failed in loadNamespace() for 'Rgraphviz', details:
call: value[[3L]](cond)
error: unable to load shared object 'C:/Users/Abraham/R/win-library/2.14/Rgraphviz/libs/x64/Rgraphviz.dll':
LoadLibrary failure: %1 is not a valid Win32 application.
Check that (1) graphviz is installed on your system; (2) the installed version of graphviz matches '2.20.3'; this is
the version used to build this Rgraphviz package; (3) graphviz is accessible to R, e.g., the path to the graphviz
'bin' directory is in the system 'PATH' variable. See additional instructions in the 'README' file of the Rgraphviz
'source' distribution, available at
http://bioconductor.org/packages/release/bioc/html/Rgraphviz.html
Ask further questions on the Bioconductor mailing list
http://bioconductor.org/docs/mailList.html
Error: package/namespace load failed for ‘Rgraphviz’
有人知道可能出了什么问题吗?我已经在不同版本的 R 上尝试过这个,并且发生了同样的问题。
仅供参考:
> sessionInfo()
R version 2.14.0 (2011-10-31)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] graph_1.32.0 BiocInstaller_1.2.1
loaded via a namespace (and not attached):
[1] tools_2.14.0