How to build an archived package on R 3.0.0

匿名 (未验证) 提交于 2019-12-03 02:03:01

问题:

Recently R 3.0.0 was rolled out. One of the requirements was that "Packages need to be (re-)installed under this version (3.0.0) of R."

The problem occurs when you have packages that have been archived. In an OS independent way how do you build packages like uroot? As you can see the package is archived.

回答1:

The easiest way to build a package from the archive is to use devtools:

library(devtools) install_url("http://cran.r-project.org/src/contrib/Archive/uroot/uroot_1.4.tar.gz") 

There are three challenges:

  • You need to have a working development environment. On windows, this means you need Rtools; on the mac, the xcode command line tools; and on linux, the appropriate development packages

  • There is currently a bug in devtools which means it doesn't find the right version of Rtools on windows. A fix is on its way to CRAN.

  • There's normally a good reason that a package has been put in the archive: it's likely that it does not pass R CMD check in the current version of R, so even once you've installed it, it might not work correctly. Be careful!



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!