不能在我的Windows笔记本电脑,从安装的加载项RStudio背后代理

问题描述:

我的会话信息(主要是微软R打开3.4.1,RStudio 1.0.153时,Windows 10 64位)不能在我的Windows笔记本电脑,从安装的加载项RStudio背后代理

> 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?

可以使用代理服务器设置与HTTR包从GitHub安装:

library(httr) 
with_config(use_proxy(url='proxy url',port_number, username="username",password="yourpass"), devtools::install_github('github/directory'))