I’m building a vignette for my R package and am using rstantools. The issue is that my build of my vignette fails at the rstan::sampling step - I get the error below. My understanding is that the Stan programs are compiled and stored as a list element in “stanmodels.” Do I need to export stanmodels in the NAMESPACE or something like that? I went through the step by step rstantools gude and did not see this mentioned.
fit.reg<- rstan::sampling(stanmodels$reg_model,data = dat,chains = 2,cores=2,iter =4000) Error: processing vignette 'Simulation_Example.Rmd' failed with diagnostics: error in evaluating the argument 'object' in selecting a method for function 'sampling': object 'stanmodels' not found --- failed re-building ‘Simulation_Example.Rmd’