0

edited 2018-04-26: Changed title as per comments, this is a broader issue with R3.5.0

original:

I'm pretty new to R, and not savvy with all of it's joys.

I've just had my works computer upgrade (result!) to windows 10 with java version 8.1 64bit; r 3.5.0, and r studio 1.1.447.

My code is no longer loving qdap package. It claims to install but won't library in.

CODE:

`pkg <- c("rJava","rmarkdown", "tidyverse","ggplot2", "knitr", "tm", "RColorBrewer", "wordcloud", "qdapDictionaries","qdapRegex", "qdapTools","qdap")

new.pkg <- pkg[!(pkg %in% installed.packages())]
if (length(new.pkg)) {
  install.packages(new.pkg, repos = "http://cran.rstudio.com")
}

library(qdap)`

output:

`Loading required package: qdapTools
Error: package or namespace load failed for ‘qdapTools’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘data.table’
    Error: package ‘qdapTools’ could not be loaded`

googling suggested I needed to modify the dependencies part, which threw this one

`install.packages(new.pkg, repos = "http://cran.rstudio.com", dependencies = TRUE)

also installing the dependencies ‘data.table’, ‘koRpus’, ‘lda’, ‘proxy’, ‘SnowballC’

Package which is only available in source form, and may need compilation of C/C++/Fortran:
  ‘data.table’
      These will not be installed`

Any thoughts (and fixes!) much appreciated. sorry for obvs noobie question.

AJP
  • 1
  • 4
  • so this looks like it might be part of a wider 3.5.0 issue: https://github.com/Rdatatable/data.table/issues/2793 https://stackoverflow.com/questions/50014310/unable-to-install-rs-data-table-on-r-version-3-5-windows-10 https://stackoverflow.com/questions/49838553/data-table-package-in-r-3-5-does-not-install – AJP Apr 26 '18 at 13:43

2 Answers2

1

I am by no means an expert here, but found a fix for this exact same problem earlier today!

Download and install the most recent version of RTools from the following link: https://cran.r-project.org/bin/windows/Rtools/. After restarting R, run this code:

install.packages("data.table")

When the error message arises, you should see a pop-up asking if you'd like to attempt to install the package from its source. Click 'yes' and it should install correctly!

  • thanks @Jacob Rothschild. So I havent appeased the R gods it seems.... installed R tools 3.5 from CRAN. tired install, got the "needs to be complied will not be installed error". Restarted the machine, googled using R tools. found this [link](http://jtleek.com/modules/01_DataScientistToolbox/02_10_rtools/#1) - tells me I need to install devtools and check whether R tools installed properly `WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.0 was found. (Only the following incompatible version(s) of Rtools were found:3.5)` – AJP Apr 30 '18 at 08:45
  • whereas it seems running install.packages from R studio instead of R, did give me the insall package from source option.... 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` – AJP Apr 30 '18 at 08:50
0

The GitHub for data.table has directions to a daily-build windows binary of data.table https://github.com/Rdatatable/data.table/wiki/Installation following the instructions on this and installing from the zip file now works. note that a few days ago it did not. Hopefull "normal" install practices will work soon too.

AJP
  • 1
  • 4