how to avoid recompiling in RStan?

66 views
Skip to first unread message

Bob Carpenter

unread,
Apr 21, 2016, 7:43:55 PM4/21/16
to Stan users mailing list
I can't seem to get it to work consistently.

I use this:

> library(rstan);
> rstan_options(auto_write = TRUE);

and then this

> fit <- stan("bern.stan", data=list(y=y, N=N), save_dso = TRUE);

What happens is that if I quit out of R and restart,
it uses the saved model. But as long as I'm in the
same session, it doesn't.

I'm on the Mac on the latest version of RStan.

- Bob

Andrew Gelman

unread,
Apr 21, 2016, 7:47:10 PM4/21/16
to stan-...@googlegroups.com
I’ve had this problem too.
> --
> You received this message because you are subscribed to the Google Groups "Stan users mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-users+...@googlegroups.com.
> To post to this group, send email to stan-...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


Ben Goodrich

unread,
Apr 22, 2016, 12:21:23 AM4/22/16
to Stan users mailing list
On Thursday, April 21, 2016 at 7:43:55 PM UTC-4, Bob Carpenter wrote:
What happens is that if I quit out of R and restart,
it uses the saved model.  But as long as I'm in the
same session, it doesn't.

What does

file.info(dir(tempdir(), full.names = TRUE))[,4:6]

output?

Ben
Reply all
Reply to author
Forward
0 new messages