I tried to install a specific version of rstan with:
remotes::install_version(package = "rstan", version = "2.21.8")
And I encountered the error:
chains.cpp:19:10: **fatal error:**stan/math/prim/mat/fun/mean.hpp:No such file or directory
#include <stan/math/prim/mat/fun/mean.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could be related to the StanHeader version? Although, installing the latest version of StanHeader did not help, either. My Operating System is Rocky Linux 8.9 (Green Obsidian), Platform: x86_64-redhat-linux-gnu (64-bit), with R version 4.3.3
Many thanks in advance for any suggestions :)