我的会话信息(基本上是它的Microsoft R Open 3.4.1,RStudio 1.0.153,Windows 10 64 bit)
> sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils
[5] datasets methods base
other attached packages:
[1] RevoUtilsMath_10.0.1
loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.4.1
[3] R6_2.2.0 RevoUtils_10.0.6
[5] tools_3.4.1 withr_2.0.0
[7] curl_2.6 memoise_1.1.0
[9] git2r_0.19.0 digest_0.6.12
[11] devtools_1.13.3
我试图安装一些RStudio addins但没有成功。无论我尝试安装什么插件,使用devtools::install_github
(请参阅Installation)的建议过程都会失败并显示相同的错误消息:
> devtools::install_github("benmarwick/wordcountaddin", type = "source", dependencies = TRUE)
Installation failed: Failure when receiving data from the peer
> devtools::install_github("rstudio/addinexamples", type = "source")
Installation failed: Failure when receiving data from the peer
我在公司代理后面工作。我可以毫无问题地从CRAN安装R软件包:
> install.packages("devtools")
Installing package into ....
(as ‘lib’ is unspecified)
trying URL 'https://mran.microsoft.com/snapshot/2017-09-01/bin/windows/contrib/3.4/devtools_1.13.3.zip'
Content type 'application/zip' length 443758 bytes (433 KB)
downloaded 433 KB
package ‘devtools’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
....
如何安装RStudio插件?
答案 0 :(得分:1)
您可以使用httr包的代理设置从github安装:
library(httr)
with_config(use_proxy(url='proxy url', port = port_number,
username="username", password="yourpass"),
devtools::install_github('github/directory'))