簡體   English   中英

為什么我不能在RStudio中安裝“預測”包?

[英]Why can't I install “forecast” package in RStudio?

我試圖安裝“預測”軟件包並且安裝時遇到問題。 我嘗試了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"*

這是一篇有類似問題的帖子。 任何幫助將不勝感激。 先感謝您!

索菲

解決問題的最簡單方法是嘗試選擇不同的CRAN鏡像來下載和安裝forecast包。 您可以通過選擇以下方式手動選擇鏡像:

Packages -> Set CRAN mirror...

我剛剛使用新加坡鏡子運行install.packages("forecast") (因為我住在那里),我沒有問題。

如果必須繼續使用當前鏡像,則必須確定無法下載哪些依賴項,並且必須從某個位置手動獲取它們。

我有同樣的問題 。 命令后:

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

出現警告:install.packages中的警告:包'forecast_5.9.tgz'不可用(對於R版本3.1.2)

以下命令有效

install.packages("forecast") 

還安裝了其他相關的包。

最好的Swapnil

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM