Operating System: Windows 10 Enterprise
Interface Version: RStan Version: 2.18.1
Compiler/Toolkit: Sorry, I don't know what it means
Other potential helpful information list below:
R Version: 3.4.4
RStudio Version: 1.2.1335
RTools Version: 3.5
However, the compile error message is showing as below:
fit <- stan(file = '8schools.stan', data = schools_dat)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! file2638530d6dd0.cpp:8:39: fatal error: stan/model/model_header.hpp: No such file or directory
#include <stan/model/model_header.hpp>
^
compilation terminated.
make: *** [C:/PROGRA~1/R/R-34~1.4/etc/x64/Makeconf:215: file2638530d6dd0.o] Error 1
Warning message:
running command 'make -f "C:/PROGRA~1/R/R-34~1.4/etc/x64/Makeconf" -f "C:/PROGRA~1/R/R-34~1.4/share/make/winshlib.mk" -f "//domain.internal/dfs/home/chzhang/My Documents/.R/Makevars.win" CXX='$(CXX11) $(CXX11STD)' CXXFLAGS='$(CXX11FLAGS)' CXXPICFLAGS='$(CXX11PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX11LDFLAGS)' SHLIB_LD='$(SHLIB_CXX11LD)' SHLIB="file2638530d6dd0.dll" WIN=64 TCLBIN=64 OBJECTS="file2638530d6dd0.o"' had status 2
In addition: Warning message:
running command 'C:/PROGRA~1/R/R-34~1.4/bin/x64/R CMD SHLIB file2638530d6dd0.cpp 2> file2638530d6dd0.cpp.err.txt' had status 1
Error in sink(type = "output") : invalid connection
Additionally, two pieces of information might help for the solutions:
I install the RStan in my company laptop;
I strictly follow the installation specification from the link above to install the RStan and related things, there is no error message for installation.
Can you provide your sessionInfo()? It doesnât look like itâs finding StanHeaders, which also needs to be installed. Itâs usually installed as a dependency of rstan, I believe.
Many thanks for your quick input, especially on Friday night!
It still does not work after remove and install.
However, two pieces of information may help:
Since RStan is installed in my company laptop, the path is a little bit different from the traditional ones (start with â/*****â), as the screenshot below indicates, the path starts with â\****â:
When I tried to re-install StanHeaders, RStan provide two options (Y/N) for âinstall from sources the package which needs compilationâ as the screenshot below:
Else if I choose No(Again, firstly remove/install StanHeaders), running library(rstan) is okay, and re-run the statement - fit <- stan(file = â8schools.stanâ, data = schools_dat), different errors show as below:
One thing might helpful:
After I installed BH, it does not show on the package list on the right bottom part of RStudio,as the screenshot below indicates.
No. If you enter installed.packages()["BH", ], it will indicate if the BH package is already installed. Note that it reads âinstalled.packagesâ, not âinstall.packagesâ.
Recently, I tried to another way to solve the issue:
RStan works well on my own laptop, and all related files: R, RStudio, RTools and related files are installed in C Drive.
Thus, I repeat the whole installation process in my company laptop. However, there is new error as the screenshot below:
I tried to re-install RStan based on the link you provided. I donât know why it always ask me to install âRcppEigenâ, although I have installed. Please see the screenshot regarding the error and the new package installed based on the new link: