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".
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.
Depending on how far back you want to go, you can also use the MRAN snapshot archive. This is a sequence of daily snapshots of CRAN, going back to September 2014.
Eg to install a package from CRAN as it was on 30 June 2015:
install.package("my_package",
repos="https://mran.microsoft.com/snapshot/2015-06-30")
Try
install.packages('/path/dynamo_0.1.3.tar.gz', type = 'source')
where path
is the path to the file you downloaded. That is it on a Mac! On Windows you have to play a bit with the slashes :-)
For what it's worth, package gafit is available again without resorting to tricks.
As suggested above it was broken for some years as the core R system changed some packaging conventions. Hopefully fully fixed now.