I am getting the below error while trying to install 'SP' package in R Studio. Can someone please help me with this?
- installing source package 'sp' ...
** package 'sp' successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I"c:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Rcentroid.c -o Rcentroid.o
process_begin: CreateProcess(NULL, gcc -IC:/PROGRA~1/R/R-42~1.2/include -DNDEBUG -Ic:/rtools42/x86_64-w64-mingw32.static.posix/include -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c Rcentroid.c -o Rcentroid.o, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:253: Rcentroid.o] Error 2
ERROR: compilation failed for package 'sp' - removing 'C:/Users/AppData/Local/R/win-library/4.2/sp'
Warning in install.packages :
installation of package ‘C:/users/downloads/sp_1.6-0.tar.gz’ had non-zero exit status