I am currently working on an R package making use of precompiled Stan code as set up by rstantools::rstan_package_skeleton(). This generally works well, but it fails as soon as I try
to use the ‘cores’ argument of rstan::sampling. Below is the code of the function I use
This usually has to do with a different version of the package being picked up by the nodes than that which is loaded in the current R session. But if you can wait a bit, we are going to roll out a different build process for packages with precompiled models. I don’t know whether it will fix this problem or what new problems it will create, but it fixes some longstanding ones.
Thanks Ben! I get the same error when installing the package from source or binary versions. Do you have any specific workaround in mind? It is not a major issue for me just something I would like to fix at some point.
I have used the latest rstantools version to prepare my package via rstan_package_skeleton. cores will work when I built the package via build source or build binary package but not when running build & reload. Not sure why.