gpt4 book ai didi

r - 安装 DMwR 包时出现错误

转载 作者:行者123 更新时间:2023-12-01 23:20:03 25 4
gpt4 key购买 nike

您好,我在从 RGUI-3.3.1 安装 DMwR 软件包时收到此错误消息。

Error in read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) : 
cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In read.dcf(file.path(pkgname, "DESCRIPTION"), c("Package", "Type")) :
cannot open compressed file 'bitops/DESCRIPTION', probable reason 'No such file or directory'

最佳答案

方法 1:

报告的错误是无法打开连接。在 Windows 中是 often a firewall problem and is in the Windows R FAQ 。通常的第一次尝试应该是运行 internet2.dll。在控制台 session 中,您可以使用:

setInternet2(TRUE)

NEWS for R version 3.3.1 Patched (2016-09-13 r71247)(仅限Windows)功能设置Internet2()没有影响,将在适当的时候被删除类(class)。方法之间的选择“内部的”和“维尼内特”现在由方法的论点网址()和下载文件()并且可以设置它们的默认值通过选项。开箱即用的默认设置仍然存在“维尼内特”(正如从那时起右3.2.2)

您正在使用版本 3.3.1,这就是它不再工作的原因。

方法 2

该错误表明该软件包需要另一个不可用的软件包bitops。该包不在任何依赖项中,但也许其中一个依赖项需要它(在本例中,它是:ROCR)。

尝试安装:

install.packages("bitops",repos="https://cran.r-project.org/bin/windows/contrib/3.3/bitops_1.0-6.zip",dependencies=TRUE,type="source") 

软件包 DMwR 包含作为导入的软件包 abind、zoo、xts、quantmod 和 ROCR。因此,除了安装 5 个软件包之外,您还必须安装 DMwR 软件包,手动安装这些软件包。

按以下顺序安装软件包:

 install.packages('abind')
install.packages('zoo')
install.packages('xts')
install.packages('quantmod')
install.packages('ROCR')
install.packages("DMwR")
library("DMwR")

<强> Approach 3 :

chooseCRANmirror() 

enter image description here 从弹出列表中选择 CRAN 镜像。然后安装软件包:

install.packages("bitops")
install.packages("DMwR")

关于r - 安装 DMwR 包时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39845442/

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