Hi!
I am trying to provide a binary R library on a windows platform. So I serialized my stan model in question with
sm1 <- stan("log2bayes_single.stan", chains=0, data=NULL)
saveRDS(sm1, "log2bayes_single.rda")
and on the target machine I intended to run the code
l2b_fit <- readRDS("log2bayes_single.rda")
l2b <- stan(fit=l2b_fit, warmup=250, iter=1250)
However, this works on my own machine, but on the target machine this crashes R horribly with the message
"Error in withCallingHandlers(tryCatch ...
object '.rcpp_warning_recorder' not found
I would prefer not to rely on the auto_write feature and make calls ala stan("log2bayes_single.stan") while assuming that the auto_write stuff will take care of it. On the target machines, there will be no Rtools installed, only rstan; hence this model caching must work.
I would prefer to use rstan, but a solution could be to stick to cmdstan binaries. Or could during the package building a compile step of the C++ translated stan model be integrated?
Many thanks for any pointers.
Best,
Sebastian