Entering edit mode
I need to install partialAR package in R but i am unable to install it shown the error message
THE FOLLOWING IS THE R CODE I PUT
Downloading GitHub repo matthewclegg/partialAR@HEAD
✔ checking for file 'C:\Users\hemant\AppData\Local\Temp\RtmpKG8NNY\remotes20cc5145622b\matthewclegg-partialAR-ab8b670/DESCRIPTION' (1.9s)
─ preparing 'partialAR':
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ building 'partialAR_1.0.12.tar.gz'
Installing package into ‘C:/Users/hemant/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
* installing *source* package 'partialAR' ...
** using staged installation
** libs
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/hemant/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/hemant/AppData/Local/R/win-library/4.2/Rcpp/include' -I"C:/RBuildTools/4.2/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cfit.cc -o cfit.o
cfit.cc: In function 'double loglik_par_c(Rcpp::NumericVector, double, double, double, double, double)':
cfit.cc:171:41: error: 'PI' was not declared in this scope
171 | double nll = (n/2.0)*log(tvar * 2.0*PI) + esumsq/(2.0*tvar);
| ^~
cfit.cc: In function 'double loglik_par_t_c(Rcpp::NumericVector, double, double, double, double, double, double)':
cfit.cc:202:66: error: 'PI' was not declared in this scope
202 | double const_term = n * (lgamma((nu+1.0)*0.5) - 0.5*log(nu * PI) -
| ^~
make: *** [C:/PROGRA~1/R/R-42~1.2/etc/x64/Makeconf:258: cfit.o] Error 1
ERROR: compilation failed for package 'partialAR'
* removing 'C:/Users/hemant/AppData/Local/R/win-library/4.2/partialAR'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/hemant/AppData/Local/Temp/RtmpKG8NNY/file20cc5a3ca96/partialAR_1.0.12.tar.gz’ had non-zero exit status
This post does not fit the theme of this forum.