Unable to install catboost in R - r

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.

Related

R Package panelAR not available to install

I'm trying to install the R package called panelAR in order to perform an autoregressive model AR(1) for a sample of N=17 spanish regions and T=32, but i can't do it. It seems it has been deleted from CRAN. My R version is 4.1.2 btw.
I just wanna know if there is any way of getting the package or a similar one to perform AR models for panel data.
You can download the package from the archive. Make sure you have installed the car package as well as the panelAR package depends on it. Then, you can install the package from the file you downloaded. Assuming it's in the path Users/yourname/downloads/panelAR_0.1.tar.gz, you can do:
install.packages("Users/yourname/downloads/panelAR_0.1.tar.gz",
type= "source",
repos= NULL)
I did this and was able to execute the example for the panelAR() function.
> version
_
platform x86_64-apple-darwin17.0
arch x86_64
os darwin17.0
system x86_64, darwin17.0
status
major 4
minor 1.1
year 2021
month 08
day 10
svn rev 80725
language R
version.string R version 4.1.1 (2021-08-10)
nickname Kick Things
The package was archived because it didn't pass some CRAN checks. Sometimes these are not fatal (as it appears in this situation). Sometimes they are fatal on some types of systems and not others. In any event, the package will get archived if the maintainer does not respond with a fix for the errors.

R installation for Gurobi 9.1.2 does not work with R 4.0.4

As stated in the question: the installation which worked fine in the past seems to be broken. Any ideas how to solve this issue?
There has been a similar issue in the past, but I am not sure, if it is a similar problem. Although the output only states a warning, the installation does not succeed.
See also here
Details
R.version
_ platform x86_64-w64-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 4 minor 0.4 year 2021 month 02 day 15 svn rev
80002 language R version.string R version 4.0.4 (2021-02-15) nickname
Lost Library Book
install.packages("C:/gurobi912/win64/R/gurobi_9.1-2")
Warning in install.packages : package
‘C:/gurobi912/win64/R/gurobi_9.1-2’ is not available for this version
of R
A version of this package for your version of R might be available
elsewhere, see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
When installing the R package for Gurobi, you need to set repos=NULL as #MrFlick already noted in the comments and as is listed in the official Gurobi installation guide for R: https://www.gurobi.com/documentation/9.1/quickstart_windows/r_ins_the_r_package.html

Issue with installing R package on R studio

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.

How to view/change the installation of R that RStudio uses?

After installing either anaconda or jupyter, RStudio now shows some logs when installing packages, which indicate it's using R installed by anaconda, rather than the original version I had installed.
This is not a problem, until I try to install various packages, and I get some maze of frustrating c++ issues (due to graph dependencies).
What I've tried so far
Changed .libPaths() from the anaconda path to the default locations (but this doesn't help for R, only for R libraries)
Question
How can I tell which R installation RStudio is using, and how do I change it (from the anaconda version, back to the vanilla R version I previously had installed)
If you type version in the Rstudio console window it will tell you which version of R you are using...
> version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29)
nickname Holding the Windsock
>
previous relaeases of R can be found here:
https://cran.r-project.org/bin/windows/base/old/
To those still searching for an answer and stumbled here
As listed above, basic info on the current R version is found entering this in the console of your RStudio
version
To view which R version is being used:
R.home() #tells you the R working directory
RSTUDIO_WHICH_R #tells you the source location of the R instance being used
Changing the version of R being used is much trickier. Consulting the official documentation can help, but realistically its easiest on Windows and a hassle on Mac/Linux. There might be some sneakier issues with Mac/Linux profiles and config variables, detailed more here
Best of luck!

Why can't I install the XML package

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").

Resources