轻松安装已从CRAN存储库中删除的软件包 [英] Install the package that has been removed from the CRAN repository easily

查看:327
本文介绍了轻松安装已从CRAN存储库中删除的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一些软件包,但是它们可以在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.

例如,发电机 gafit .

尽管这些软件包已被删除,但我发现它们仍然有用,可以为我提供帮助.

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_versioninstall_localinstall_github等.

The package has other related and useful functions such as install_version, install_local, install_github, etc.

这篇关于轻松安装已从CRAN存储库中删除的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆