Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install the package that has been removed from the CRAN repository easily

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.

For instance, dynamo and gafit.

Though those packages have been removed, I find them still useful and can help me.

Is it possible to and how to install them easily? like one_line_install('http://sss.tar.gz').

By the way, I may use them in Windows and/or in OS X. So the code should be designed as "multi-platform".

like image 248
yangzh Avatar asked Sep 06 '13 10:09

yangzh


People also ask

Why are packages removed from CRAN?

It's an understandable assumption to make, but sometimes packages do get removed from CRAN (usually because they no longer pass all the CRAN checks, and the maintainer hasn't fixed it in the given time).

How do I install a package from CRAN?

Installing the CRAN packages with the menuIn RStudio go to Tools → Install Packages and in the Install from option select Repository (CRAN) and then specify the packages you want. In classic R IDE go to Packages → Install package(s) , select a mirror and install the package.


1 Answers

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.

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

like image 142
flodel Avatar answered Sep 21 '22 09:09

flodel