Am I making some basic error here?
install.packages("XML")
Warning in install.packages :
package ‘XML’ is not available (for R version 2.13.0)
Installing package(s) into ‘C:/Program Files/R/R-2.13.0/library’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘XML’ is not available (for R version 2.13.0)
It is probably because www.omegahat.org doesn't exist anymore. So,
command install.packages("XML", repos = "http://www.omegahat.org/R")
does not work. Instead use below:
install.packages("XML", repos = "http://www.omegahat.net/R")
There can be two conditions when you see such error:
The package does not exist in the library (you should install it
from it's own library)
The package is not compatible with your R
version (you should change your R version that is compatible, if you
can afford it)
For the first condition, search on internet and read about the package you want to install and check the provider and repository (for this case, XML, it is official R package)
For the second condition, you can find the information in the following link:
http://cran.r-project.org/web/packages/XML/index.html
you can check your R version by typing the following command into your R shell:
version
which will give you all the information, for e.g:
_
platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 0.1
year 2013
month 05
day 16
svn rev 62743
language R
version.string R version 3.0.1 (2013-05-16)
nickname Good Sport
First update the R-core:
version
install.package('installr')
library(installr)
updateR()
Then install the XML module:
install.packages("XML")
What worked for me is downloading the old release of the XML package and installing from the package archive
install.packages("~/R/win-library/3.6/XML_3.99-0.3.zip", repos = NULL, type = "win.binary").
Related
I work on Rstudio and my version() result is:
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 3.1
year 2016
month 06
day 21
svn rev 70800
language R
version.string R version 3.3.1 (2016-06-21)
nickname Bug in Your Hair
I downloaded the latest version this morning from the web to have the last update.
On this, I can not install the package "raster":
> install.packages('raster')
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/florent/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘raster’ is not available (for R version 3.3.1)
I have checked many help online but I can´t find the solution. I did an update of R (to 4.0.2) with which this raster package is working.
Anyone has a solution for this? It begins to be tricky...
Thanks!
It appears that you updated RStudio, but not R. RStudio is a program to make it easier to use R. So what you need to do is install the current version of R. As you can see from your version, you are using a version from 2016. That is ancient in the R world.
In RStudio you can look under Tools / Global Options / General / R version and perhaps change the R version if multiple versions are available.
I'm facing trouble downloading catboost in R.
Kindly help to resolve this issue,
> install.packages('catboost')
Installing package into ‘C:/Users/Rishabh Ojha/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘catboost’ is not available (for R version 3.5.2)
My version is as follows:
> version
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 5.2
year 2018
month 12
day 20
svn rev 75870
language R
version.string R version 3.5.2 (2018-12-20)
nickname Eggshell Igloo
The error is pretty self-explanatory. catboost is not available from CRAN (but see e.g. here for a discussion).
You can however install catboost if you follow the installation guide available from the catboost GitHub project site. Specifically, the installation instructions for installing catboost on a Windows machine can be found on Install from a local copy on Windows.
From the latter link:
It is strongly recommended to install the released version. Try it if other installation methods result in errors.
Windows installation currently requires Visual C++ 2017 Build Tools.
Training on GPU requires NVIDIA Driver of version 390.xx or higher.
It's probably also worth taking a look at the project's GitHub issues, e.g. Building and installing problem in R. Good luck.
I have been trying to install packages from MRAN, specifically bsts amoung others. If I run:
install.packages(c("Boom","BoomSpikeSlab", "bsts"),repos = "https://mran.revolutionanalytics.com/snapshot/2016-01-01/")
I get the following output:
Warning in install.packages :
URL 'https://mran.revolutionanalytics.com/snapshot/2016-01-01/bin/macosx/mavericks/contrib/3.3/PACKAGES.gz': status was '404 Not Found'
Warning in install.packages :
URL 'https://mran.revolutionanalytics.com/snapshot/2016-01-01/bin/macosx/mavericks/contrib/3.3/PACKAGES': status was '404 Not Found'
Warning in install.packages :
unable to access index for repository https://mran.revolutionanalytics.com/snapshot/2016-01-01/bin/macosx/mavericks/contrib/3.3:
cannot download all files
Packages which are only available in source form, and may need compilation of C/C++/Fortran: ‘Boom’ ‘BoomSpikeSlab’ ‘bsts’
Do you want to attempt to install these from sources?
y/n:
I also get the same result when changing the repository location using options(). A simple solution would be simply to install from source as below:
install.packages(c("Boom","BoomSpikeSlab", "bsts"),repos = "https://mran.revolutionanalytics.com/snapshot/2016-01-01/",type = "source")
However what doesn't make sense is that, when you check the repository on your browser, the binaries appear to be available:
https://cran.r-project.org/web/packages/bsts/index.html (CRAN)
https://mran.revolutionanalytics.com/snapshot/2016-01-01/web/packages/bsts/index.html (MRAN)
Additionally I would prefer not to have to compile the source code, especially as R's compiler is out of date...
Previous stack overflow questions have suggested this is because the repository is down, however this doesn't make sense as the binaries can be accessed through the browser. So is there an issue with MRAN, is there an issue with install.packages?
I should note I have tried executing this code in both RStudio and R through the terminal. Additionally, for reference, this is my system details:
platform x86_64-apple-darwin13.4.0
arch x86_64
os darwin13.4.0
system x86_64, darwin13.4.0
status
major 3
minor 3.2
year 2016
month 10
day 31
svn rev 71607
language R
version.string R version 3.3.2 (2016-10-31)
nickname Sincere Pumpkin Patch
Thanks in advance for the help.
I've now solved this problem. When calling from the MRAN repository using install.packages you need to capitalise "MRAN" part of the URL.
So this works:
install.packages("bsts", repos = "https://MRAN.revolutionanalytics.com/snapshot/2016-06-01/")
And this only works from source:
install.packages("bsts", repos = "https://mran.revolutionanalytics.com/snapshot/2016-06-01/")
I have been trying to install the package "doby" from RStudio (ver 0.98.501 ) on ubuntu 13.04 but it keeps throwing the following warning and the package does not get installed.
Warning in install.packages :
package ‘doBy’ is not available (for R version 2.15.2)
I have followed all the instructions given here :
http://www.r-bloggers.com/installing-r-packages/
Can someone please suggest where I might be going wrong ?
If you are on Ubuntu, please see this README for Ubuntu from CRAN --- it will allow you to get to the current version of R (today 3.0.2, in a few days 3.0.3) with mininal effort.
Once you have a current R version, getting the doBy package (which depends on it) installed is a piece of cake too.
If however you prefer to stay with your version of R, you can manually fetch an older version of doBy from its CRAN archive. Download to, say, /tmp and run R CMD INSTALLby hand on it.
From http://cran.r-project.org/web/packages/doBy/index.html, package doBy depends on R version 3.0 and above. Your R version is 2.15.2. You will need to install a later version of R, and then change the settings in Rstudio to target the updated version.
I am getting the following error when trying to install ggplot2:
> install.packages("ggplot2")
Installing package(s) into ‘/home/dodo/R/x86_64-pc-linux-gnu-library/2.13’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘ggplot2’ is not available (for R version 2.13.1)
I am running Ubuntu 11.10 (oneiric).
Any help is appreciated.
You need R (>= 2.14.0) for this version.
So please go and see the instructions at CRAN to upgrade on Ubuntu to the current R and once you have R 2.14.2 up and running (which is a matter of four or five commands, thanks to the magic of apt-get and friends, upgrade to the current ggplot2.
ggplot2-0.9.0 has an explicit dependency on R >= 2.14 (and an implicit one of R >= 2.14.1). Thus it can not be installed in R version 2.13.1. Perhaps you can get the previous version (0.8.9) from the archives and install that.
You need to install a version that is appropriate to your old version of R or you need to upgrade. To go the first route, you should find a version of ggplot2 in the Archives and then install from source (which is I believe the default for Linux). Perhaps try the UCLA CRAN mirror:
http://cran.stat.ucla.edu/src/contrib/Archive/ggplot2/ggplot2_0.8.9.tar.gz