轻松安装已从 CRAN 存储库中删除的软件包 [英] Install the package that has been removed from the CRAN repository easily
问题描述
我想使用一些软件包,但它们已在 CRAN 中删除,尽管它们以前可用的版本可以从存档中获得.这些包也不在 r-forge 中.
I want to use some packages, but they has been deleted in CRAN, though their formerly available versions can be obtained from the archive. Those packages are not in r-forge, too.
虽然这些软件包已被删除,但我发现它们仍然有用并且可以帮助我.
Though those packages have been removed, I find them still useful and can help me.
是否可以轻松地安装它们以及如何安装它们?比如 one_line_install('http://sss.tar.gz')
.
Is it possible to and how to install them easily? like one_line_install('http://sss.tar.gz')
.
顺便说一句,我可能会在 Windows 和/或 OS X 中使用它们.所以代码应该设计为多平台".
By the way, I may use them in Windows and/or in OS X. So the code should be designed as "multi-platform".
推荐答案
使用 devtools
包很容易,因为不需要自己下载包.例如:
It is easy using the devtools
package as there is no need to download the package yourself. For example:
library(devtools)
install_url('http://cran.r-project.org/src/contrib/Archive/dynamo/dynamo_0.1.3.tar.gz')
install_url('http://cran.r-project.org/src/contrib/Archive/gafit/gafit_0.4.tar.gz')
我毫不怀疑这将独立于平台.
I have no doubt this will be platform-independent.
该包还有其他相关且有用的功能如install_version
、install_local
、install_github
等
The package has other related and useful functions such as install_version
, install_local
, install_github
, etc.
这篇关于轻松安装已从 CRAN 存储库中删除的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!