Reputation: 4426
I am writing an R package that depends on Stan and Rstan. I run the installation on an Azure machine Standard_D64_v3
and install r-base
and r-cran-stan
with sudo apt-get
and rstan
and Rcpp
with R
's install.packages()
(among others, see shell setup script and R setup script).
This process worked OK last month. Today I was able to install the package (as evidenced by the welcome message) and then have a runtime error from incompatible versions.
...
* DONE (PosteriorBootstrap)
Reloading attached PosteriorBootstrap
Welcome to PosteriorBootstrap, a parallel approach for adaptive non-parametric learning
Error: package ‘StanHeaders’ 2.18.1 was found, but > 2.18.1 is required by ‘rstan’
In addition: Warning message:
version 2.18.1.10 of ‘StanHeaders’ masked by 2.18.1 in /usr/lib/R/site-library
Execution halted
I do not have StanHeaders
anywhere in my code so I suspect the problem is between different packages. How can I solve this problem with versions?
Upvotes: 0
Views: 914
Reputation: 4426
As @nicola wrote in the comments, the fix is to reinstall StanHeaders
with:
install.packages("StanHeaders")
The previous code may have stopped working because of a new version of R, but I could not determine the cause.
Upvotes: 1