I’ve read through the rstantools step by step vignette and I think I understand how to add functions to a package I am creating using rstantools. I’ve also looked through the help file for rstan_create_package()
as suggested in the vignette.
As I’m building my package, I sometimes have trouble adding Stan models to the package (i.e., the model does not get added to mypacackage:::stanmodels$new
). I think I’ve figured out the steps through trial and error. The steps are as follows, correct?
- Add new stan file, e.g.,
inst/stan/new.stan
- Run
rstantools::use_rstan()
- Run
pkgbuild:: compile_dll ()
because I’m usingdevtools
. - Run
roxygen2::roxygenize()
to update the documentation - Run
devtools::install()
If these steps are correct, I will be happy to fork the step by step on GitHub and add this tutorial for adding a second function.