gpt4 book ai didi

r - testthat 发生了什么?

转载 作者:行者123 更新时间:2023-12-02 06:17:17 27 4
gpt4 key购买 nike

我不记得有任何问题,但突然之间,我无法安装任何包,因为 testthat 无法通过测试。作为第 22 条军规,我也无法安装 testthat,因为它无法通过测试。

R version 3.0.1 (2013-05-16) -- "Good Sport"
Copyright (C) 2013 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

Error in library(testthat) : there is no package called 'testthat'
[Previously saved workspace restored]

>
> install.packages("testthat")
Installing package into '/home/user/R/x86_64-pc-linux-gnu-library/3.0'
(as 'lib' is unspecified)
--- Please select a CRAN mirror for use in this session ---
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 14: reading configurations from ~/.fonts.conf is deprecated.
trying URL 'http://cran.cs.wwu.edu/src/contrib/testthat_0.8.1.tar.gz'
Content type 'application/x-gzip' length 40777 bytes (39 Kb)
opened URL
==================================================
downloaded 39 Kb

Error in library(testthat) : there is no package called 'testthat'
Calls: source -> withVisible -> eval -> eval -> library
Execution halted

The downloaded source packages are in
'/tmp/RtmpMoaIPO/downloaded_packages'
Warning message:
In install.packages("testthat") :
installation of package 'testthat' had non-zero exit status

有没有办法绕过一次安装运行的测试或以其他方式解决这个问题,以便我可以修复我的 R 安装?

最佳答案

我住在网络不好的地方,我不想下载新版本的 R 及其所有依赖项来解决这个问题。所以你可以手动安装旧版本的testthat: http://cran.r-project.org/src/contrib/Archive/testthat/

在版本 3.0.2 上,testthat 版本 0.8.1 似乎工作。下载 gzip 文件后,请执行以下操作:

R CMD 安装 testthat_0.8.1.tar.gz

关于r - testthat 发生了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24498928/

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