I have a workflow where I write unit test for my Stan functions in R, but run my test scripts through
Makefiles. Often the test code changes faster than the Stan code and if there was a convenient way to save the functions that
expose_stan_functions() exposes (like you can save the
stanmodel object it would avoid needless recompilations and speed up testing.
Does anyone have any experiences or ideas with this?
Just saving the object returned by
saveRDS() does not keep dso around, so that didn't work. For the
stanmodel object the magic seems to happen in cxxfunplus.R, but I can't quite figure out how that would be adapted for