为什么我不能在RStudio中安装“预测”包?

问题描述 投票:4回答:2

我试图安装“预测”软件包并且安装时遇到问题。我尝试了install.packages(“forecast”)并收到此错误消息:

*Installing package into ‘C:/Users/DT217/Documents/R/win-library/3.1’
(as ‘lib’ is unspecified)
  有二进制版本(将被安装),但源代码版本是后来的:
         binary source
forecast    5.8    5.9
also installing the dependencies ‘zoo’, ‘RcppArmadillo’
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/zoo_1.7-11.zip'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/zoo_1.7-11.zip'
Warning in install.packages :
download of package ‘zoo’ failed
trying URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/RcppArmadillo_0.4.600.4.0.zip'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
cannot open URL'http://cran.rstudio.com/bin/windows/contrib/3.1/RcppArmadillo_0.4.600.4.0.zip'
Warning in install.packages :
download of package ‘RcppArmadillo’ failed
trying URL'http://cran.rstudio.com/bin/windows/contrib/3.1/forecast_5.8.zip'
Warning in install.packages :
cannot open: HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) : 
cannot open URL 'http://cran.rstudio.com/bin/windows/contrib/3.1/forecast_5.8.zip'
Warning in install.packages :
download of package ‘forecast’ failed*

我试图打开错误中给出的URL,无法打开它。我也试过安装“zoo”包并得到类似的错误。但是,我能够安装其他一些软件包,所以有些软件包正在运行。

以下是我正在使用的RStudio版本的信息:

$platform
[1] "x86_64-w64-mingw32"
$arch
[1] "x86_64"
$os
[1] "mingw32"
$system
[1] "x86_64, mingw32"
$status
[1] ""
$major
[1] "3"
$minor
[1] "1.3"
$year
[1] "2015"
$month
[1] "03"
$day
[1] "09"
$`svn rev`
[1] "67962"
$language
[1] "R"
$version.string
[1] "R version 3.1.3 (2015-03-09)"
$nickname
[1] "Smooth Sidewalk"*

这是一篇有类似问题的帖子。任何帮助将不胜感激。先感谢您!

索菲

r installation forecasting
2个回答
5
投票

解决问题的最简单方法是尝试选择不同的CRAN镜像来下载和安装forecast软件包。您可以通过选择以下方式手动选择镜像:

Packages -> Set CRAN mirror...

我刚刚使用新加坡镜子运行install.packages("forecast")(因为我住在那里),我没有问题。

如果必须继续使用当前镜像,则必须确定无法下载哪些依赖项,并且必须从某个位置手动获取它们。


2
投票

我有同样的问题 。命令后:

install.packages("forecast_5.9.tgz")

出现警告:install.packages中的警告:包'forecast_5.9.tgz'不可用(对于R版本3.1.2)

以下命令有效

install.packages("forecast") 

还安装了其他相关的包。

最好的梦想家

© www.soinside.com 2019 - 2024. All rights reserved.