简体   繁体   English

无法安装Quantreg软件包并更新R版本

[英]Unable to install quantreg package and update R version

I am using R version 3.3.1 on RStudio interface, and a Windows 10 OS. 我正在RStudio界面和Windows 10操作系统上使用R版本3.3.1。 I was trying to install the 'quantreg' package for quantile regression, however I was getting the error message 我正在尝试安装'quantreg'软件包以进行分位数回归,但是却收到错误消息

Warning in install.packages : InternetOpenUrl failed: 'The operation timed out' install.packages中的警告:InternetOpenUrl失败:“操作超时”

Warning in install.packages : downloaded length 180224 != reported length 1521162 install.packages中的警告:下载的长度为180224!=报告的长度为1521162

Warning in install.packages : package 'quantreg' is not available (for R version 3.3.1) install.packages中的警告:软件包“ quantreg”不可用(对于R版本3.3.1)

I repeated the process afterwards several times but got the last line of the above error all the time. 之后,我重复了几次该过程,但始终都得到上述错误的最后一行。 Thinking it was due to using an older R version, I tried updating by installing the 'installr' package, but that too gave me the same error as above. 认为这是由于使用了较旧的R版本引起的,因此我尝试通过安装'installr'软件包进行更新,但这也给了我与上述相同的错误。 I tried updating R from the Tools Menu, but it kept telling me that the current R version is the latest. 我尝试从“工具”菜单更新R,但是它一直告诉我当前的R版本是最新的。 Also this is my first time here, so apologies if I've messed up the blockquoting. 这也是我第一次来,如果我弄乱了引用的话,我深表歉意。

You need to downgrade R. 您需要降级R。

Download an older version here (I recommend 3.2.5) and install. 在此处下载旧版本(我建议3.2.5)并安装。

Then (in R), go to Tools > Global Options > press the "Change" button. 然后(在R中),转到工具>全局选项>按下“更改”按钮。

Now simply select the version you want and restart R and try reinstalling the package. 现在,只需选择所需的版本,然后重新启动R,然后尝试重新安装该软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM