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"
我从哪里开始?
解决方法
从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")