轻松安装已从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屋!