微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

我使用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")

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐