Reputation: 35
The package is available on this website. http://cran.r-project.org/src/contrib/Archive/rlandscape/
When I use:
install.packages("rlandscape",
repos = "http://cran.r-project.org/src/contrib/Archive/rlandscape/",
type="source")
I get the following error:
package 'rlandscape' is not available (for R version 3.1.2)
I have tried older versions too but no luck..
Upvotes: 2
Views: 1946
Reputation: 226182
The devtools
package has a function that can install archived versions. Try:
library("devtools")
install_version("rlandscape",version="1.0",
repos="http://cran.r-project.org")
(You should be able to use repos=getOption("repos")["CRAN"]
instead, but it looks like your repos
option is slightly messed up, i.e. the URL is missing the http://
.)
(The repos
argument is necessary to work around what I think is a glitch in install_version
, i.e. it assumes that repos
is a length-1 character vector.)
This should, I think, also automatically install appropriate dependencies -- although it's a bit of a catch-22 if they are in the CRANextra repository for Windows, since that has to be suppressed in order to get install_version
to work ...
It may also be the case that install_version
automatically assumes that you want the package and all dependencies installed as source (not binary) installations, in which case you will need to have compilation tools installed. The rlandscape
package doesn't actually have any compiled code included, but its dependencies do ...
Upvotes: 2
Reputation: 2970
This is an old (archived) package that is no longer supported. If you really need it, you can install it using R CMD INSTALL
but you need also to install all its dependencies manually.
Installing your desired package gave me the following:
>R CMD INSTALL ~/Downloads/rlandscape_1.0.tar.gz
* installing to library ‘/Users/mohamedahmed/Rlibs’
ERROR: dependencies ‘spatstat’, ‘deldir’, ‘gWidgets’, ‘gWidgetsRGtk2’ are not available for package ‘rlandscape’
* removing ‘/Users/mohamedahmed/Rlibs/rlandscape’
I am not sure all dependencies are still available on CRAN, but it seems to be challenging task.
Upvotes: 1