我无法在R中加载汽车包.我尝试重新安装使用
install.packages("car",dependencies=TRUE)
Run Code Online (Sandbox Code Playgroud)
来自R和RStudio.我尝试quantreg按照另一篇文章中的建议进行安装,然后重新安装.安装似乎是成功的,但根本无法加载程序.
这是完整的错误:
loadNamespace出错(j < - i [[1L]],c(lib.loc,.libPaths()),versionCheck = vI [[j]]):没有名为'pbkrtest'的包
另外:警告信息:包'car'是在R版本3.2.3下构建的.
错误:'car'的包或命名空间加载失败
我正在尝试安装 CRAN 群体遗传学包hierfstat;但是 libproj.so.13 打印出以下错误:
\n\n> install.packages("hierfstat")\nInstalling package into \xe2\x80\x98/home/ecoevo/R/x86_64-pc-linux-gnu-library/3.6\xe2\x80\x99\n(as \xe2\x80\x98lib\xe2\x80\x99 is unspecified)\ntrying URL \'https://cloud.r-project.org/src/contrib/hierfstat_0.04-22.tar.gz\'\nContent type \'application/x-gzip\' length 460778 bytes (449 KB)\n==================================================\ndownloaded 449 KB\n\n* installing *source* package \xe2\x80\x98hierfstat\xe2\x80\x99 ...\n** package \xe2\x80\x98hierfstat\xe2\x80\x99 successfully unpacked and MD5 sums checked\n** using staged installation\n** R\n** data\n** inst\n** byte-compile and prepare package for lazy loading\nError in dyn.load(file, DLLpath = DLLpath, ...) : \n unable to load shared object \'/home/ecoevo/R/x86_64-pc-linux-gnu-library/3.6/sf/libs/sf.so\':\n libproj.so.13: cannot open shared object file: No such file or directory\nCalls: <Anonymous> ... …Run Code Online (Sandbox Code Playgroud) 我在 2103 MacBook Pro 上使用 R Studio。我在下载和安装软件包之前没有问题,但最近我的所有软件包都被下载,然后无法安装:
trying URL 'http://cran.rstudio.com/bin/macosx/mavericks/contrib/3.1/manipulate_1.0.1.tgz'
Content type 'application/x-gzip' length 33770 bytes (32 Kb)
opened URL
==================================================
downloaded 32 Kb
The downloaded binary packages are in
/var/folders/yl/7q0_4h3j60d5pp52vmz0b06r0000gn/T//Rtmpa4oYSr/downloaded_packages
Run Code Online (Sandbox Code Playgroud)
.libPath() 返回我的 R 库的正确位置(不是这个)
我可以从下载的包中手动安装,但是这个额外的步骤非常烦人,我想恢复正确的行为。
似乎有人在这里遇到了同样的问题。解决方案是添加更多交换空间。这似乎不是我的问题,因为我的机器上似乎有足够的交换和 RAM。
有没有人遇到并解决过这个问题?
希望这有一个简单的答案,但我还没有找到它.
我正在编写一个R包,当安装在Windows上时,我希望它执行一个搜索系统文件的脚本,list.files(path = "C:/Program Files/, ...)然后将该路径作为文本文件保存到包目录中供以后参考.
我尝试保存脚本,src/install.libs.R但是阻止了我的包构建.
如果有替代解决方案,我正在尝试保存驻留在程序文件目录(某处!)中的javaw.exe文件的路径,以便我可以通过函数快速调用它system2().
我在更新R后在CentOS上的R中安装软件包时遇到了一些麻烦.下面是我尝试在R中安装软件包时会发生什么的示例:
> install.packages("ggplot2")
Installing package into '/home/albers/R/x86_64-pc-linux-gnu-library/3.2'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
Error in download.file(url, destfile = f, quiet = TRUE) :
internet routines cannot be loaded
In addition: Warning message:
In download.file(url, destfile = f, quiet = TRUE) :
unable to load shared object '/usr/local/lib64/R/modules//internet.so':
/usr/local/lib64/R/modules//internet.so: undefined symbol: curl_multi_wait
HTTPS CRAN mirror
1: 0-Cloud [https] 2: Austria [https]
3: Chile [https] 4: China (Beijing 4) [https]
5: Colombia …Run Code Online (Sandbox Code Playgroud) 通常,install.packages(..., type = "both")如果有需要从源代码构建的包,则需要用户输入。
例如(目前,使用 R 3.5.1),install.packages(c("feather", "tidyr"), type = "both"))将从二进制安装 tidyr 并从源代码安装 Feather,只要用户在进行 Feather 安装时单击“是”。
有没有办法自动点击是,或者不需要用户通过一些选项输入 install.packages()?
注意: install.packages(..., type = "source")不需要用户输入,但它会构建所有包,在这种情况下这不是理想的行为。
我将Google colab用于我的一个项目。我有一个软件包列表,我需要它们才能完美运行笔记本电脑。因此,我是否应该在每次启动colab时都安装所有软件包,或者仅安装一次就可以永久使用它们?
python-3.x install.packages google-cloud-platform google-colaboratory
我的 gdtools 包有问题。我想从源代码安装它,但不幸的是我无法在 Linux 机器上安装任何额外的库。我正在做的就是解决这个问题,它是在安装时包含软件包:
install.packages(repos = c("http://localhost.net/cran"), type = "source", pkgs = c('gdtools'), configure.vars = c("INCLUDE_DIR=/extra/gdtools/windows/cairo-1.15.10/include/cairo"))
Run Code Online (Sandbox Code Playgroud)
这让我可以更进一步。但是我需要再包含一个目录,指向 freetype 库:/extra/gdtools/windows/cairo-1.15.10/include/freetype2/freetype
但是当我尝试将其添加到命令时它不起作用。我尝试过很多方法,例如它不起作用:
install.packages(repos = c("http://localhost.net/cran"), type = "source", pkgs = c('gdtools'), configure.vars = c("INCLUDE_DIR=/extra/gdtools/windows/cairo-1.15.10/include/cairo /extra/gdtools/windows/cairo-1.15.10/include/freetype2/freetype"))
Run Code Online (Sandbox Code Playgroud)
有人可以帮我怎么做吗?我也从 R CMD 级别尝试过。任何解决方案对我来说都是可以接受的。
我正在尝试安装 的开发版本tidyr。当我尝试devtools::install_github("tidyverse/tidyr")或 时remotes::install_github("tidyverse/tidyr"),出现以下错误:
> devtools::install_github("tidyverse/tidyr")\nDownloading GitHub repo tidyverse/tidyr@master\nDownloading GitHub repo r-lib/vctrs@master\nThese packages have more recent versions available.\nWhich would you like to update?\n\n1: All\n2: CRAN packages only\n3: None\n4: rlang (0.3.4 -> 18856f22a...) [GitHub]\n5: ellipsis (0.1.0 -> 9908b24a2...) [GitHub]\n\nEnter one or more numbers separated by spaces, or an empty line to cancel\n1: 1\nrlang (0.3.4 -> 18856f22a...) [GitHub]\nellipsis (0.1.0 -> 9908b24a2...) [GitHub]\nDownloading GitHub repo r-lib/rlang@master\n\xe2\x88\x9a checking for file \'C:\\Users\\owner\\AppData\\Local\\Temp\\RtmpYDrYNh\\remotes96bc1c295445\\r-lib-rlang-18856f2/DESCRIPTION\' ...\n- preparing \'rlang\': (2s)\n\xe2\x88\x9a checking DESCRIPTION meta-information …Run Code Online (Sandbox Code Playgroud) 我在无法访问互联网的计算机上的 Windows 下使用自定义本地 CRAN 镜像 (jfrog) 时遇到问题:
浏览网页后,我看到了更多类似的问题,但没有一个完全相同(参见,例如此处),我通过添加到我的 .Rprofile 来解决这个问题
options(repos = c(CRAN = "internalrepo"),
download.file.method = "curl",
download.file.extra = "-k -L")
Run Code Online (Sandbox Code Playgroud)
绕过检查 SSL 证书。
这对我来说适用于只能访问本地网络的计算机,但对于使用自定义 CRAN 镜像连接到互联网的计算机来说,这似乎是一个坏主意。
另外,我想了解问题的原因。R 处理 SSL 证书的方式是否发生了变化,或者我们在 R 4.2 的安装中是否破坏了某些内容?
sessionInfo()R 4.1.2 和 R 4.2.0 之间没有Sys.getenv()显示出太大差异,但在 R 4.2.0 中,我看到有一个额外的环境变量
CURL_CA_BUNDLE指向 R 安装目录 /etc/curl-ca-bundle.crt
install.packages ×10
r ×9
cran ×2
centos ×1
curl ×1
lib ×1
linux ×1
python-3.x ×1
r-sf ×1
rlang ×1
rtools ×1
ssl ×1
tidyr ×1
ubuntu-20.04 ×1
user-input ×1