加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

如何使用Microsoft R Open 3.3.2获得rmarkdown 1.2

发布时间:2020-12-14 02:06:24 所属栏目:Windows 来源:网络整理
导读:我使用RStudio 1.0.136与Microsoft R Open 3.3.2当我做文件 – 新文件 – R Markdown ……它说 rmarkdown 1.2 is required but 1.1 is available 和 Check that getOption(“repos”) refers to a CRAN repository that contains the needed package version
我使用RStudio 1.0.136与Microsoft R Open 3.3.2当我做文件 – >新文件 – > R Markdown ……它说

rmarkdown 1.2 is required but 1.1 is available

Check that getOption(“repos”) refers to a CRAN repository that contains the needed package versions

getOption(“repos”)给了我这个:

CRAN 
"https://mran.revolutionanalytics.com/snapshot/2016-11-01" 
                                                 CRANextra 
                      "http://www.stats.ox.ac.uk/pub/RWin"

我从哪里开始?

解决方法

我们对MRO(以及其他MS R发行版)所做的一件事是将默认存储库指向静态时间点快照,以实现可重复性.

从https://mran.revolutionanalytics.com/documents/rro/reproducibility/开始:

For example,a package you used yesterday may have been updated overnight,or maybe one of its dependencies did,and now your script no longer works as expected. Developers are left wondering,“When do they plan to fix and update this package? Do I need to rewrite my script?” Packages get fixed whenever their maintainers choose to do so — whether that’s today,tomorrow,or next month. Each time a package breaks,so will all of the scripts using that version of the package. This approach is clearly suboptimal with respect to the stability that R programmers crave.

Similarly,whenever users point to the latest CRAN repository,install.packages could install one version of the package for ‘User_A’ today,another version of that same package for ‘User_B’ who points to a different mirror,or even a “package not found” error when ‘User_C’ attempts to install tomorrow. Once again,this inconsistency presents challenges when sharing scripts.

在您的情况下,您使用的快照截至2016年11月1日.在该日期,最新版本的rmarkdown为1.1.如果您运行install.packages,您将获得该版本,而不是更新的版本.

如果你肯定想要rmarkdown 1.2,你可以覆盖install.packages调用中的默认仓库:

install.packages("rmarkdown",repos="https://cloud.r-project.org")

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读