Rstanarm update fails

Update of five packages failed on my Windows 10 box today, all apparently dependent on Rstan or Rstanarm. (ctsem, MESS, raster, RcppArmadillo, and rstanarm) I thought that this might be an Rtools 4.0 issue, but Rtools 4.0 installed and works for other packages. BUT, I had to install Rtools 4.0 in a non-standard location, since I don't have admin priviliges on this UIowa Research Desktop. The updates failed on both RStudio and a naked R command window.

Running Windows 10 up-to-date, R 4.0.2, RStudio 1.3.1056. Both 32 and 64 bit R are installed on all the desktops, so the update starts (and aborts) with arch i386. Rtools 2.0 installed for both 32 and 64 bit systems.

Update of rstanarm failed with the following message. Any help gratefully received.

> install.packages('rstanarm')
Installing package into ‘C:/$Recycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/$RNTH3XX/Documents/Home/R/win-library/4.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---

  There is a binary version available but the source version is later:
         binary source needs_compilation
rstanarm 2.19.3 2.21.1              TRUE

installing the source package ‘rstanarm’

trying URL ''
Content type 'application/x-gzip' length 3548723 bytes (3.4 MB)
downloaded 3.4 MB

* installing *source* package 'rstanarm' ...
** package 'rstanarm' successfully unpacked and MD5 sums checked
** using staged installation
** libs

*** arch - i386
"C:/PROGRA~1/R/R-40~1.2/bin/i386/Rscript" -e "source(file.path('..', 'tools', 'make_cc.R')); make_cc(commandArgs(TRUE))" stan_files/continuous.stan
Wrote C++ file "stan_files/"

"c:/Users/hunsickerl/Documents/R/Rtools40/mingw32/bin/"g++ -m32 -std=c++1y -std=gnu++14 -I"C:/PROGRA~1/R/R-40~1.2/include" -DNDEBUG -I"../inst/include" -I"C:/$Recycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/$RNTH3XX/Documents/Home/R/win-library/4.0/StanHeaders/include/src" -DBOOST_DISABLE_ASSERTS -DEIGEN_NO_DEBUG -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/StanHeaders/include' -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/rstan/include' -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/BH/include' -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/Rcpp/include' -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/RcppEigen/include' -I'C:/ecycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/NTH3XX/Documents/Home/R/win-library/4.0/RcppParallel/include'     `"C:/PROGRA~1/R/R-40~1.2/bin/i386/Rscript" -e "RcppParallel::CxxFlags()"` `"C:/PROGRA~1/R/R-40~1.2/bin/i386/Rscript" -e "StanHeaders:::CxxFlags()"`   -O3 -Wno-unused-variable -Wno-unused-function -c stan_files/ -o stan_files/continuous.o
stan_files/ fatal error: Rcpp.h: No such file or directory
 #include <Rcpp.h>
compilation terminated.
make: *** [C:/PROGRA~1/R/R-40~1.2/etc/i386/Makeconf:227: stan_files/continuous.o] Error 1
rm stan_files/
ERROR: compilation failed for package 'rstanarm'
* removing 'C:/$Recycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/$RNTH3XX/Documents/Home/R/win-library/4.0/rstanarm'
* restoring previous 'C:/$Recycle.Bin/S-1-5-21-1343024091-1383384898-725345543-277224/$RNTH3XX/Documents/Home/R/win-library/4.0/rstanarm'

The downloaded source packages are in
Warning message:
In install.packages("rstanarm") :
  installation of package ‘rstanarm’ had non-zero exit status

Are you running R 4.0.x? It looks like a lot of people (including me) have been having problems getting rstan to install and work properly under R 4.0. If this is the case for you, I don't have a solution for the problem you're having, but you could check the Stan forum and perhaps ask a question there if the thread I linked to doesn't help you fix the probllem.

Aaaarrrgggggh!! Fortunately, it appears, my update of rstanarm failed. At least the old version seems still to work. I went to the Stan forum site but that was not very helpful. I tried to run the Stan 8Schools example, but there were several problems. I was able to find the sample data, and I think that I found the model code. Where am I supposed to find the 8schools.stan file that they refer to? The vignette didn't have anything that I was able to run. Should I be downgrading my stan version to something that runs until the RStan folks get the problems cleared up?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.