3

I just installed R 3.5.0 and tried to install data.table in two ways:

  1. from CRAN repository:

    > install.packages("data.table")
    Installing package into ‘C:/Users/Owner/Documents/R/win-library/3.5’
    (as ‘lib’ is unspecified)
    Package which is only available in source form, and may need compilation of 
    C/C++/Fortran: ‘data.table’
    
  2. I also tried downloading the zip file and installing from it. It looked like it was installing and then gave the following warning:

    Warning in install.packages :
    installation of package ‘C:/Users/Owner/Downloads/data.table_1.10.4-3.tar.gz’ had non-zero exit status
    

Looking at previous questions, I installed RTools but still didn't help....

Omry Atia
  • 2,411
  • 2
  • 14
  • 27
  • When you say you didn't find Rtools in the repository, where did you look? https://cloud.r-project.org/bin/windows/Rtools/ shows it is there (and I just started the download). – r2evans Apr 25 '18 at 05:05
  • checking this out – Omry Atia Apr 25 '18 at 05:08
  • just installed RTools, but still the same error messages – Omry Atia Apr 25 '18 at 05:22
  • 1
    Maybe this is because [R 3.5.0 expects packages to bite-compiled](https://www.r-bloggers.com/r-3-5-0-is-released-major-release-with-many-new-features/)? – Jaap Apr 25 '18 at 05:27
  • Does `devtools::has_devel()` return `TRUE`? – r2evans Apr 25 '18 at 05:28
  • @Jaap so how do I install this package? – Omry Atia Apr 25 '18 at 05:30
  • @Jaap, I expect that that is something done to a package once it is downloaded, optionally compiled, and installed; not something that woudl preclude installing something in the first place. Or am I misunderstanding what byte-compiling means? – r2evans Apr 25 '18 at 05:30
  • @r2evans: "C:/PROGRA~1/R/R-35~1.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c Warning message: In system(cmd) : 'make' not found Error: Command failed (1) I did install devtools so I don't understand what this message is – Omry Atia Apr 25 '18 at 05:31
  • 3
    This is a know issue and has been [reported on Github as well already](https://github.com/Rdatatable/data.table/issues/2793). See also the [package checks](https://cran.r-project.org/web/checks/check_results_data.table.html). Could you try with the [development version](https://github.com/Rdatatable/data.table/wiki/Installation)? – Jaap Apr 25 '18 at 05:40
  • 1
    @OmryAtia: When you install `Rtools`, you need to check the box where you allow it to modify your system `PATH` variables. `RTools` will then put `C:/RTools/bin; C:/RTools/mingw_32/bin` to `PATH` so that `make` can be found – Tung Apr 25 '18 at 05:54
  • Omry, that message means that R does not have the tools available (see Tung's comment on `PATH`) for compiling packages. Please search about the use of Rtools in R, and the importance of updating the path either directly or via secondary means. Bottom line, you need to fix Rtools to install anything (that compiles). Then consider using the dev version of `data.table`, as Jaap suggested. – r2evans Apr 25 '18 at 06:24
  • I've installed the dev version ( at least I have a folder under win-library) after rebooting but > library(data.table) Error: package or namespace load failed for ‘data.table’: package ‘data.table’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version I;m on Windows – pssguy Apr 25 '18 at 10:49
  • **First** you need to make sure that you have not only RTools but the gcc compiler available to R via your PATH. Now, having said that, Windows 7 and Windows Server 2012 also have trouble installing `data.table` with 3.5.0 (but works fine on all other versions) but it looks unrelated to your issue possibly. – Hack-R Apr 25 '18 at 15:36

0 Answers0