【发布时间】:2020-09-08 03:25:18
【问题描述】:
尝试更多地了解 R 中的预测,但我似乎找不到安装预测包的方法,这真的很令人沮丧。任何帮助深表感谢。我试过了
install.packages("forecast")
install.packages('forecast', dependencies = TRUE)
但没有任何作用
当我运行 install.packages('forecast') 时,它多次给我这个错误
Error in readRDS(file) :
cannot read workspace version 3 written by R 4.0.2; need R 3.5.0 or newer
紧随其后
* installing *source* package 'ggplot2' ...
** package 'ggplot2' successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in readRDS(pfile) :
cannot read workspace version 3 written by R 4.0.2; need R 3.5.0 or newer
ERROR: lazy loading failed for package 'ggplot2'
* removing 'C:/Users/David/Documents/R/win-library/3.4/ggplot2'
* restoring previous 'C:/Users/David/Documents/R/win-library/3.4/ggplot2'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-34~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\David\Documents\R\win-library\3.4" C:\Users\David\AppData\Local\Temp\RtmpQrZOJI/downloaded_packages/ggplot2_3.3.2.tar.gz' had status 1
Warning in install.packages :
installation of package ‘ggplot2’ had non-zero exit status
--- 然后我运行 library("forecast") 时出现此错误
错误:readRDS(pfile) 中“预测”的包或命名空间加载失败: 无法读取由 R 4.0.2 编写的工作区版本 3;需要 R 3.5.0 或更新版本 另外:警告信息: 包“预测”是在 R 版本 3.4.4 下构建的
【问题讨论】:
-
尝试安装时遇到什么错误?
-
试试
install.packages("ggplot2")。似乎很奇怪,它没有安装。检查任何错误消息。您的预测包是在非常旧的 R 版本(3.4.4)下构建的,这似乎也很奇怪。您实际运行的是哪个版本的 R? -
@David 您尝试将您的 R 更新到最新版本。
-
您好,@MrFlick 我尝试安装它,但没有解决问题。我目前正在运行 [64-bit] R-3.4.2 也许这是个问题?我尝试更新它,但我仍然有相同的版本
-
@Ash 我刚刚更新到 4.0.2 版,它仍然给我带来问题
标签: r