gpt4 book ai didi

r - 安装包失败,: Error in if (file. exists(dest) && file.mtime(dest)

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

我正在尝试安装重新思考

httr::set_config( httr::config( ssl_verifypeer = 0L ) ) 
with_config(use_proxy("http://myco.com:5555"), install_github("rmcelreath/rethinking", lib ="C://TOOLS/R-3.4.0/library"))

我收到错误消息:
Downloading GitHub repo rmcelreath/rethinking@master
from URL https://api.github.com/repos/rmcelreath/rethinking/zipball/master
Installing rethinking
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) && :
missing value where TRUE/FALSE needed
Error in if (file.exists(dest) && file.mtime(dest) > file.mtime(lib) && :
missing value where TRUE/FALSE needed

关于我的版本的一些信息:
> packageVersion("devtools")
[1] ‘1.12.0’
> packageVersion("httr")
[1] ‘1.2.1’
> R.Version()$version.string
[1] "R version 3.4.0 (2017-04-21)"

你能建议如何让安装工作吗?

谢谢你。

++++++++++++++ 当我运行 TraceBACK() 时,我得到
3: installed.packages()
2: as.data.frame(installed.packages(), stringsAsFactors = F)
1: (function ()
{
uniqueLibPaths <- .rs.uniqueLibraryPaths()
x <- suppressWarnings(library(lib.loc = uniqueLibPaths))
x <- x$results[x$results[, 1] != "base", ]
pkgs.name <- x[, 1]
pkgs.library <- x[, 2]
pkgs.desc <- x[, 3]
pkgs.url <- file.path("help/library", pkgs.name, "html",
"00Index.html")
loaded.pkgs <- .rs.pathPackage()
pkgs.loaded <- !is.na(match(normalizePath(paste(pkgs.library,
pkgs.name, sep = "/")), loaded.pkgs))
instPkgs <- as.data.frame(installed.packages(), stringsAsFactors = F)
pkgs.version <- character(length = length(pkgs.name))
for (i in 1:length(pkgs.name)) {
pkgs.version[[i]] <- .rs.packageVersion(pkgs.name[[i]],
pkgs.library[[i]], instPkgs)
}
pkgs.library <- .rs.createAliasedPath(pkgs.library)
packages = data.frame(name = pkgs.name, library = pkgs.library,
version = pkgs.version, desc = pkgs.desc, url = pkgs.url,
loaded = pkgs.loaded, check.rows = TRUE, stringsAsFactors = FALSE)
packages[order(packages$name), ]
})()

最佳答案

这似乎是 3.4.0 的一般错误。在 Windows 下。

尝试重新安装打过补丁的版本 ,看看有没有帮助..

https://cran.r-project.org/bin/windows/base/rpatched.html

更新:
R 3.4.1。已被释放。这也可能会解决您的问题。
https://cran.r-project.org/bin/windows/base/

关于r - 安装包失败,: Error in if (file. exists(dest) && file.mtime(dest),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44054022/

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