Rstudio version: RStudio-1.3.1093
R version:R-3.6.3
lme4 package version: lme4_1.1-27.1
Dear friends, When I install the Lme4 package using Rstudio, an error occurs. The detailed error information is as follows,I would be grateful if you could give me some advice or solutions
ERROR: dependency 'Rcpp' is not available for package 'lme4'
removing 'D:/Program Files (x86)/R-3.6.3/library/lme4'
Warning in install.packages :
installation of package ‘lme4’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\h-p\AppData\Local\Temp\RtmpuYumiQ\downloaded_packages’
I'm not sure if this is the only problem, since you are not posting the complete output message but, at least this part is telling you that you are missing a package dependency, try installing it first and if you get a new error message, post it here.
When I installed “Rcpp”, a new error appeared, as detailed below:
> install.packages("Rcpp")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
There is a binary version available but the source version is later:
binary source needs_compilation
Rcpp 1.0.6 1.0.7 TRUE
installing the source package ‘Rcpp’
试开URL’https://cran.rstudio.com/src/contrib/Rcpp_1.0.7.tar.gz'
Content type 'application/x-gzip' length 2941808 bytes (2.8 MB)
downloaded 2.8 MB
* installing *source* package 'Rcpp' ...
** 成功将'Rcpp'程序包解包并MD5和检查
** using staged installation
** libs
*** arch - i386
c:/Rtools/mingw_32/bin/g++ -std=gnu++11 -I"D:/Program Files (x86)/R-3.6.3/include" -DNDEBUG -I../inst/include/ -O2 -Wall -mtune=core2 -c api.cpp -o api.o
sh: line 1: c:/Rtools/mingw_32/bin/g++: No such file or directory
make: *** [D:/Program Files (x86)/R-3.6.3/etc/i386/Makeconf:215: api.o] Error 127
ERROR: compilation failed for package 'Rcpp'
* removing 'D:/Program Files (x86)/R-3.6.3/library/Rcpp'
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\h-p\AppData\Local\Temp\RtmpMzmtM8\downloaded_packages’
You need to have RTools installed in your system for compiling packages from source, you can download a matching version of RTools (for your old R version) from here