gpt4 book ai didi

r - 在 Windows 中安装 RGraphviz 时出现问题

转载 作者:行者123 更新时间:2023-12-02 09:39:12 25 4
gpt4 key购买 nike

我已阅读 RGraphviz 页面上的自述文件,并查看了 R 帮助列表和此处的许多问题,但我仍然没有找到无法在 R 2.14.0 上安装 Rgraphviz 包的原因.

  1. 我已经下载并安装了 Graphviz 2.20.3(尽管开始菜单显示它是 2.21)

  2. 我已将 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 Software Stack\bin\"
    [12] "C:\Program Files\NTRU Cryptosystems\NTRU TCG Software Stack\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"

  3. 使用bioconductor安装Rgraphviz包。

    source("http://bioconductor.org/biocLite.R") biocLite("Rgraphviz") BioC_mirror: 'http://www.bioconductor.org' Using R version 2.14, BiocInstaller version 1.2.1. Installing package(s) 'Rgraphviz' Installing package(s) into ‘C:/Users/Abraham/R/win-library/2.14’ (as ‘lib’ is unspecified) trying URL 'http://www.bioconductor.org/packages/2.9/bioc/bin/windows/contrib/2.14/Rgraphviz_1.32.0.zip' Content type 'application/zip' length 933734 bytes (911 Kb) opened URL downloaded 911 Kb

    包“Rgraphviz”已成功解压并检查 MD5 和

    下载的包在 C:\Users\Abraham\AppData\Local\Temp\RtmpYNFDxs\downloaded_pa​​ckages警告信息:“boot”无法更新,安装目录“C:/Program Files/R/R-2.14.0/library”不可写“class”无法更新,安装目录“C:/Program Files/R/R-2.14.0/library”不可写“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 [...截断]

现在它表明 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

最佳答案

就个人而言,我建议 (a) 更新到 R-2.15.1,然后 (b) 使用 Bioconductor 的“devel”版本(“devel”版本将于 10 月 2 日成为发布版本,因此对于患者建议等到那时)。 (b) 在全新的 R 安装中使用

source("http://bioconductor.org/biocLite.R")
BiocInstaller::useDevel()

More detailed instructions涵盖您希望使用 Bioconductor 的发布版本和开发版本的情况。然后安装Rgraphviz

biocLite("Rgraphviz")

故事结束,无需安装 graphviz,等等

关于r - 在 Windows 中安装 RGraphviz 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12570461/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com