As the title indicates, when I run the the example (8 schools) code as below, the error regarding prep_call_sampler(object) appears. Please note that before I submitted this ticket, I did a quick check online, for a*b within the model, it has been specified as a * b, and my operation system is Win 10.
The prep_call_sampler function comes with the rstan package
so there is no way it cannot be found when the rstan package is installed properly.
My guess is that rstan was installed while a previous rstan was loaded or else there were stanfit or stanmodel objects from a previous version of rstan in R’s global environment when you tried to install the new rstan or something else weirdly specific to that laptop. I would suggest closing all R sessions, opening up a new one without bringing in any stanfit or stanmodel objects (including those in the .RData file) and calling
Hi, I’m having the same issue 'prep_call_sampler(object): could not find function “prep_call_sampler”. I’ve tried uninstalling and reinstalling R, RStudio, rstan, to no avail. it won’t even run the example script. I was running some models last night, woke up today, tried to run the same model, all of a sudden nothing works. Are there any other solutions? Thanks ahead of time!
Running:
R Version 4.3.0 GUI 1.79 Big Sur Intel build
RStudio Version 2023.03.1+446 (2023.03.1+446)
RStan Version 2.21
Oddly, when I use the ‘Ulam’ function from Richard McElreath’s Rethinking package, Stan runs. But it won’t run the example function, or when I use the combo of compiling (stan_model) with sampling().
One more update. When I open a new R project the example stan script works. but not in the one that I am currently using.
Hi, I noticed that you encountered the same issue I’m currently facing. May I ask if you have resolved this problem? I would greatly appreciate it if you could share your solution with me. Thank you very much in advance.