我在使用 RStudio 时确实遇到了问题。\n几天前它一直工作正常。然后它说我需要最新版本的 RTools。我尝试安装它,但不认为它成功。但是现在我无法在 R 中加载任何内容。\n启动 RStudio 时,我收到以下消息:
\n Error: package or namespace load failed for \xe2\x80\x98stats\xe2\x80\x99 in inDL(x, as.logical(local), as.logical(now), ...):\n unable to load shared object 'C:/Program Files/R/R-3.6.3/library/stats/libs/x64/stats.dll':\n LoadLibrary failure: The specified module could not be found.\n\nDuring startup - Warning message:\npackage \xe2\x80\x98stats\xe2\x80\x99 in options("defaultPackages") was not found \nError in inDL(x, as.logical(local), as.logical(now), ...) : \n unable to load shared object 'C:/Program Files/R/R-3.6.3/library/stats/libs/x64/stats.dll':\n LoadLibrary failure: The specified module could not be found.\n\nRun Code Online (Sandbox Code Playgroud)\n我已经找到了这个问题的解决方案,人们说删除 /Renviron 但我不知道这会让事情变得更加混乱。
\n以下是我在 R 中输入内容的一些结果: …
尝试安装时 Rtools,我收到以下消息。我的 R 版本是 4.1.2。
install.packages("Rtools")\n警告:构建 R 包需要 Rtools,但当前尚未安装。请先下载并安装适当版本的 Rtools,然后再继续:
https://cran.rstudio.com/bin/windows/Rtools/ \ninstall.packages 中的警告:\npackage \xe2\x80\x98Rtools\xe2\x80\x99 不适用于此版本的 R
\n适用于您的 R 版本的此软件包的版本可能在其他地方可用,\n请参阅\n https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-包
\n关于如何安装 Rtools 有什么想法吗?
\n我实验室中的 Window HPC 服务器没有 Rtools,所以我在获取 Rcpp 代码时收到了这条消息。
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-32~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-32~1.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="sourceCpp_1.dll" WIN=64 TCLBIN=64 OBJECTS="MultiBayes.v1.o"' had status 127
Error in sourceCpp("./rcode/MultiBayes.v1.cpp") :
Error 1 occurred building shared library.
WARNING: The tools required to build C++ code for R were not found.
Please download and install the appropriate version of Rtools:
http://cran.r-project.org/bin/windows/Rtools/
Execution halted
Run Code Online (Sandbox Code Playgroud)
由于管理人员说在服务器中安装Rtools可能需要很长时间,我想知道是否有另一种方法可以避免此问题并在不安装Rtools的情况下运行Rcpp代码。
据我所知,构建一个包不会有帮助,因为它在安装时也使用了 Rtools。如有错误请指正。
我可以绕过这个来运行代码吗?
感谢您的任何意见和想法。
我正在尝试在 R 中下载软件包“Seurat”,该软件包已安装并且现在位于我的软件包列表中。
\n\n** testing if installed package keeps a record of temporary installation path\n* DONE (patchwork)\n\nThe downloaded source packages are in\n \xe2\x80\x98C:\\Users\\parnian\\AppData\\Local\\Temp\\RtmpAVgSd8\\downloaded_packages\xe2\x80\x99\nRun Code Online (Sandbox Code Playgroud)\n\n但是当我尝试调用它 (library(Seurat)) 时,出现以下错误:
\n\n> library(Seurat)\nError: package or namespace load failed for \xe2\x80\x98Seurat\xe2\x80\x99:\n object \xe2\x80\x98wrap_plots\xe2\x80\x99 is not exported by \'namespace:patchwork\'\nRun Code Online (Sandbox Code Playgroud)\n\n我阅读了类似的问题并手动安装了“patchwork”:
\n\n > install.packages("patchwork")\nWARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:\n\nhttps://cran.rstudio.com/bin/windows/Rtools/\nInstalling package into \xe2\x80\x98C:/Users/parnian/Documents/R/win-library/4.0\xe2\x80\x99\n(as \xe2\x80\x98lib\xe2\x80\x99 is unspecified)\nRun Code Online (Sandbox Code Playgroud)\n\n … 我遇到以下问题:每次我想通过 renv 特定命令(例如 renv::restore() 或 renv::install("class@7.3-20"))安装包“class”时,我都会收到一条错误消息。但是,如果我运行 install.packages("class",version="7.3-20") 一切正常。
\n我从转速诊断开始:
\n> renv::diagnostics()\nDiagnostics Report [renv 0.17.3]\n================================\n\n# Session Info =======================\nR version 4.3.0 (2023-04-21 ucrt)\nPlatform: x86_64-w64-mingw32/x64 (64-bit)\nRunning under: Windows 10 x64 (build 19045)\n\nMatrix products: default\nRun Code Online (Sandbox Code Playgroud)\n使用 renv 安装“class”会给出以下消息
\n> renv::install("class@7.3-20")\nConsider removing these folders from your R library.\n\nRetrieving \'https://cran.rstudio.com/src/contrib/Archive/class/class_7.3-20.tar.gz\' ...\n OK [file is up to date]\nInstalling class [7.3-20] ...\n FAILED\nError installing package \'class\':\n=================================\n\n* installing *source* package \'class\' ...\n** Paket \'class\' erfolgreich entpackt und MD5 Summen \xc3\xbcberpr\xc3\xbcft\n** using staged installation\n** libs\nusing C …Run Code Online (Sandbox Code Playgroud) 安装任何新软件包时,我收到错误消息,提示未找到 Rtools。我按照 Rtools 的手动安装说明进行操作,但仍然收到相同的错误消息。
> install.packages("phyloseq")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding
Run Code Online (Sandbox Code Playgroud)
似乎 R 没有找到 Rtools。有没有什么办法解决这一问题?
我注意到在开始新的 R 会话时,先前安装的软件包的第二个问题也消失了。这两个问题可以联系起来吗?
我的 R 版本是 4.0,我在 Windows 64 位上工作