Stan Development Team
The rstantools package provides various tools for developers of R
packages interfacing with Stan (http://mc-stan.org), including
functions to set up the required package structure, S3 generic methods to
unify function naming across Stan-based R packages, and a vignette with
guidelines for developers. To get started building a package see
rstan_package_skeleton.
Guidelines and recommendations for developers of R packages interfacing with Stan and a demonstration getting a simple package working can be found in the vignettes included with rstantools and at http://mc-stan.org/rstantools/articles/.
After reading the guidelines for developers, if you have trouble setting up your package let us know on the the Stan Forums or at rstantools issue tracker.
The useR2016 presentation How to Use (R)Stan to Estimate Models in External R Packages.