1

I'm trying to work through the example.Rmd file from https://github.com/crsh/papaja to learn how to create APA scripts in R markdown.

First step is simply loading the libraries:

 ```{r message = FALSE, warning = FALSE}
library("papaja")
library("dplyr")
library("afex")

load("../tests/testthat/data/mixed_data.rdata")
```

but I just get the following error message:

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

Afex is installed (I removed it and re-installed it just to check), but it won't load. Any ideas?

neilfws
  • 32,751
  • 5
  • 50
  • 63
Caro
  • 11
  • 2
  • 1
    Read the error message: "there is no package called ‘data.table’" - install and load that too – rg255 May 01 '18 at 05:04
  • Sorry - should have said - that also gives me an error message. Install.packages(data.table) yields Warning in install.packages : dependency ‘GenomicRanges’ is not available Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘data.table’ These will not be installed – Caro May 01 '18 at 05:25
  • BTW I'm using R 3.5 - I wonder if this is the problem: https://stackoverflow.com/questions/49838553/data-table-package-in-r-3-5-does-not-install – Caro May 01 '18 at 05:28
  • Note that currently you should load `afex` or more precisely `haven` (which `afex` imports) before `papaja` (see https://github.com/crsh/papaja/issues/199). – crsh Jun 01 '18 at 14:06

1 Answers1

0

Okay it was a problem with R 3.5 (downloaded on 28.04.2018). I replaced it with 3.4.4. and afex now loads, no problem. I suspect this is still an issue today: data.table package in R 3.5 does not install

Caro
  • 11
  • 2