How do I get rmarkdown 1.2 with Microsoft R Open 3.3.2

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-28 08:49:51

One of the things we do with MRO (and other MS R distributions) is to point the default repository to a static point-in-time snapshot, for the purposes of reproducibility.

From 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.

In your case, the snapshot you're using is as of Nov 1, 2016. At that date, the latest version of rmarkdown was 1.1. If you run install.packages, you will get that version and not anything more recent.

If you definitely want rmarkdown 1.2, you can override the default repo in your install.packages call:

install.packages("rmarkdown", repos="https://cloud.r-project.org")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!