0

Installing an old version of caret on my custom R version was a burden. I tried using the RStudio installation tool, but failed

I tried the command:

pathToFile <- "C:/Users/Fsociety/Desktop/caret_5.17-7.tar"
install.packages(pathToFile,repos = NULL, type = "source")

I got this error:

Warning: invalid package 'C:/Users/Fsociety/Desktop/caret_5.17-7.tar'
Error: ERROR: no packages specified
Warning in install.packages :
  running command '"C:/PROGRA~1/RRO/RRO-32~1.0/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\Fsociety\Documents\R\win-library\3.2" "C:/Users/Fsociety/Desktop/caret_5.17-7.tar"' had status 1
Warning in install.packages :
  installation of package ‘C:/Users/Fsociety/Desktop/caret_5.17-7.tar’ had non-zero exit status

Is there any thing wrong with the install.package that I can fix?

Roman Luštrik
  • 69,533
  • 24
  • 154
  • 197
  • 1
    How did you generate the file `caret_5.17-7.tar`? – Vincent Guillemot Mar 31 '16 at 08:54
  • Have you installed Rtools on your system? – Roland Mar 31 '16 at 09:02
  • @Roland I think this may be the "Rstudio installation tool" OP mentions. – Roman Luštrik Mar 31 '16 at 09:03
  • i had to add the .gz at the end, but the compilation of the C files for installing the package kept failing. `Warning: running command 'make -f "C:/PROGRA~1/RRO/RRO-32~1.0/R-32~1.2/etc/x64/Makeconf" -f "C:/PROGRA~1/RRO/RRO-32~1.0/R-32~1.2/share/make/winshlib.mk" SHLIB="caret.dll" WIN=64 TCLBIN=64 OBJECTS="caret.o"' had status 127 ERROR: compilation failed for package 'caret' * removing 'C:/Users/Fsociety/Documents/R/win-library/3.2/caret'` – Ismail Akrim Mar 31 '16 at 09:06
  • 2
    @RomanLuštrik No, I believe that is the "Install" button in the RStudio "Packages" pane. – Roland Mar 31 '16 at 09:07
  • Just checked and I was able to install a `package.tar` without a problem. My guess would be what Roland said - you are missing the toolchain. Install the proper version of [rtools](https://cran.r-project.org/bin/windows/Rtools/). – Roman Luštrik Mar 31 '16 at 09:07
  • @RomanLuštrik Rstudio succeeded to recognize the package file but failed to run the installation check the error above :/ – Ismail Akrim Mar 31 '16 at 09:09
  • Please stop thinking of terms of Rstudio. Rstudio is "just" an IDE. What you have here is an R issue (this is the console in the lower left corner). Everything else is sugar on top. As I mentioned in my previous comment, install Rtools (see the link above), restart R and compile the way you tried in your original question. – Roman Luštrik Mar 31 '16 at 09:11

0 Answers0