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’