devtools的ctrl加r_使用devtools从github安装R包的问题

在使用R的devtools包从GitHub安装软件包时遇到错误,提示"zip file ... cannot be opened"。已尝试更改临时目录权限、直接下载zip文件解压以及检查其他相关函数,但问题依然存在。sessionInfo显示R版本为3.1.1,已安装的包包括devtools和httr。寻求解决方案。
摘要由CSDN通过智能技术生成

与以下问题类似:

我似乎无法使用 devtools 软件包从github安装软件包,在我尝试的所有软件包上得到以下错误(slidify,rCharts,rga,magrittr等...):

Error in unzip(src, list = TRUE) :

zip file 'C:/Users/.../Rtemp\RtmpGIlGBA/master.zip' cannot be opened

In addition: Warning messages:

1: In unzip(src, exdir = target, unzip = getOption("unzip")) :

error 1 in extracting from zip file

我已经将临时目录更改为可写的地方,以防这是问题所在:

write("TMP = 'C:/Users/.../Rtemp' \n

TMPDIR = 'C:/Users/.../Rtemp' \n

TEMP = 'C:/Users/.../Rtemp'",

append = TRUE,

file = file.path(Sys.getenv('R_USER'), '.Renviron'))

readRenviron(".Renviron")

但无济于事 . 我还有 setwd() 到其他地方并通过直接从github获取zip文件来检查 unzip() 是否存在问题:

temp

download.file("https://github.com/ramnathv/slidifyLibraries/archive/master.zip",temp)

unzip(temp)

这似乎工作正常,我已经使用 build() 等安装了包...但它 not 与 install_github() 一样方便 . 有任何想法吗?

这是我的 sessionInfo() :

R version 3.1.1 (2014-07-10)

Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:

[1] LC_COLLATE=English_Ireland.1252 LC_CTYPE=English_Ireland.1252 LC_MONETARY=English_Ireland.1252 LC_NUMERIC=C

[5] LC_TIME=English_Ireland.1252

attached base packages:

[1] stats graphics grDevices utils datasets methods base

other attached packages:

[1] devtools_1.5 httr_0.3

loaded via a namespace (and not attached):

[1] digest_0.6.4 evaluate_0.5.5 memoise_0.2.1 parallel_3.1.1 RCurl_1.95-4.2 stringr_0.6.2 tools_3.1.1 whisker_0.3-2

Warning message:

closing unused connection 3 (https://github.com/ramnathv/rCharts/archive/master.zip)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值