Error in compileCode(f, code, language = language, verbose = verbose)

: Compilation ERROR, function(s)/method(s) not created! g++.exe: error: Files/R/R-3.6.1/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp: No such file or directory g++.exe: error: Files/R/R-3.6.1/library/StanHeaders/include: No such file or directory g++.exe: error: Files/R/R-3.6.1/library/RcppEigen/include: No such file or directory make: *** [C:/PROGRA~1/R/R-36~1.1/etc/x64/Makeconf:215: file2acc248c7b29.o] Error 1 Error in sink(type = “output”) : invalid connection

Hi Atieh,

You need to remove the current installations of rstan and stanheaders:


Then restart R, and run:

install.packages("rstan", type = "win.binary", dependencies = TRUE)
repos = NULL, type = "win.binary")

And you should be good to go

1 Like

Wow I am soooooo grateful dear Andrjohns. It worked and was like a magic to me.
Perfect and pale solution.