0

for my Statistical analyses, I need to use the Packages ggplot2 and lmerTest.

While installing lmerTest I updated R and was able to use the function. But after this update, I was not able to use ggplot2 anymore. So I downgraded it. If I want to install lmerTest now it shows the Error:

install.packages("lmerTest")

  Warning in install.packages :
  installation of package ‘lmerTest’ had non-zero exit status

   ---- there is no package called ‘lmerTest’ 

When I Google that problem I just find the answer to update R, but then ggplot2 won't work. I cant use lme4 instead because here is missing the p-value.

Is there no way to use both, ggplot2 and lmerTest, with Ubuntu??

I'm definitely no expert. Thanks for any help, sincerely

Maria

MaryJule
  • 23
  • 5
  • This is surprising. Both `lmerTest` and `ggplot2` should be available with the most recent versions of R. Did you follow the instructions [here](https://cran.r-project.org/bin/linux/ubuntu/) to install R? Can you show us the results of `sessionInfo()` ? – Ben Bolker May 04 '22 at 18:07
  • Hey Ben, I think I had the same problem as here: [https://github.com/rstudio/rstudio/issues/9373]. My session info is: `> sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 20.04.4 LTS` – MaryJule May 04 '22 at 18:10
  • 1
    version 3.6.3 is ancient. I think if you follow the instructions at the link in the comment above you will get the most recent stable version of R (probably 4.2.0) and all your problems might go away ... (most of the problems described in the RStudio issue are either from non-Ubuntu systems or are rather old ...) – Ben Bolker May 04 '22 at 18:16
  • Hey Ben, I followed the instructions and running now with R version 4.2.0. ggplot works, but I still can't use lmerTest. Any other idea? `------------------ CMAKE NOT FOUND -------------------- CMake was not found on the PATH. Please install CMake: ------------------ CMAKE NOT FOUND -------------------- ERROR: dependency ‘lme4’ is not available for package ‘lmerTest’ * removing ‘/home/maria/R/x86_64-pc-linux-gnu-library/4.2/lmerTest’ Warning in install.packages : Installation des Pakets ‘lmerTest’ hatte Exit-Status ungleich 0 there is no packages calles merTest ` – MaryJule May 05 '22 at 06:55
  • I found [https://stackoverflow.com/questions/23793870/lme4-package-install-failing-on-ubuntu-12-04] I tried to first install `Rcpp` and `Matrix`. Running this line `mv .Rprofile temp.Rprofile` in R and the ubuntu console and also `sudo apt-get install r-base-dev`. Still, it's not working. I'm a beginner and sure it could be my fault. – MaryJule May 05 '22 at 07:27
  • If I try to run `sudo apt-get install r-cran-lme4` it shows up the following error: `Depends on: r-cran-rcppeigen (>= 0.3.2.0.2-2) but should not be installed E: Problems cannot be corrected, you have withheld defective packages.` – MaryJule May 05 '22 at 07:39
  • I don't know what the `rcppeigen` problem is, but if you `sudo apt install cmake` you should be able to install the rest of the stuff from source (sorry this is such a pain!) – Ben Bolker May 05 '22 at 12:35
  • This way it works, finally. I hope one day I will solve my problem so quickly too, Hugh Thank you! – MaryJule May 05 '22 at 12:49

0 Answers0