Can't install devtools in R - r

I'm trying to use a script that needs the devtools package in R. I already fail installing the package. As far as I understood, this is what I should do
install.packages("devtools")
devtools::install_github("hadley/devtools")
Just those two lines in a script result in the error
Warning in install.packages("devtools") :
'lib = "/usr/local/R/3.0/lib/x86_64-linux-gnu/R/library"' is not writable
Error in install.packages("devtools") : unable to install packages
Execution halted
So the library doesn't have the permission for me to install the package? I don't have Rstudio, the version I'm using R version 3.0

Related

Error installing package RandomFields from Package Archive in R

I'm trying to install the package georob, which is no longer on CRAN. In order to install georob, I need first to install the package RandomFields which is no longer on CRAN neither. Therefore, I downloaded the file RandomFields_3.3.tar.gz from CRAN Archive and then tried to install the package RandomFields with the following command in R:
install.packages(pkgs = "C:/documents/RandomFields_3.3.tar.gz", type="source", repos=NULL)
When I do this I get the following error:
make: *** [C:/PROGRA~1/R/R-42~1.0/etc/x64/Makeconf:257: brownresnick.o] Error 1
ERROR: compilation failed for package 'RandomFields'
My installations are as follows:
Windows 10 Home, 64-bit
R version 4.2.0
R Studio 2022.07.2+576
Rtools42 for windows
Any idea how I can install georob and/or RandomFields?
Thank you very much!

Unable to install RTools even after updating to latest version of R [duplicate]

I've installed devtools for R, but when I call the library with:
library(devtools)
I get the following output:
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
So I executed the following code:
install.packages("Rtools", repos = "http://cran.r-project.org/bin/windows/Rtools/")
And I get the following output:
Installing package into ‘C:~/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://cran.r-project.org/bin/windows/Rtools/bin/windows/contrib/3.0
Warning message:
package ‘Rtools’ is not available (for R version 3.0.2)
I would appreciate any help that's out there to get Rtools onto my machine so I can call the devtools library. Thank you!
Rtools is not a package. See here: https://cran.r-project.org/bin/windows/Rtools/

Rstudio has been throwing errors since my attempt to install the devtools package [duplicate]

I've installed devtools for R, but when I call the library with:
library(devtools)
I get the following output:
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.1 from http://cran.r-project.org/bin/windows/Rtools/ and then run find_rtools().
So I executed the following code:
install.packages("Rtools", repos = "http://cran.r-project.org/bin/windows/Rtools/")
And I get the following output:
Installing package into ‘C:~/Documents/R/win-library/3.0’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository http://cran.r-project.org/bin/windows/Rtools/bin/windows/contrib/3.0
Warning message:
package ‘Rtools’ is not available (for R version 3.0.2)
I would appreciate any help that's out there to get Rtools onto my machine so I can call the devtools library. Thank you!
Rtools is not a package. See here: https://cran.r-project.org/bin/windows/Rtools/

R Not able to install CHAID

I am trying to install CHAID package into R using the command below.
install.packages("CHAID", repos="http://R-Forge.R-project.org")
I keep getting the response
Error in dev.off() : could not find function "dev.off"
Execution halted
In R CMD INSTALL
Warning in install.packages :
installation of package ‘CHAID’ had non-zero exit status
The OS is Windows10. R is running the latest 3.5.1
I tried to google the error and find a fix but without success.
Make sure you have the partykit package installed first before installing CHAID. That worked for me.

Issue installing rJava on aix7.1.3

I have installed the 32bit version of R 3.1.1 on AIX 7.1.3
I am in the step of installing the rJava package from the R shell using the command: install.packages("rJava")
However, I am getting this error:
Warning: unable to access index for repository http://cran.utstat.utoronto.ca/src/contrib
Warning messages:
1: In open.connection(con, "r") : unable to resolve 'cran.r-project.org'
2: package 'rJava' is not available (for R version 3.1.1)
It seems that R is unable to connect to the internet to download the package.
I have tried several mirror sites.
Any idea how to resolve this issue in AIX?
Is there also an alternative option to install rJava manually not through the install.packages() R command?
You could try to compile the package with devtools:
install.packages('devtools')
devtools::install_github('s-u/rJava')
Make sure to have the correct javac in your path.

Resources