yihui/knitr — pull request #902 by jrnold (2014-11-28 04:25:48+00:00)
Title: added engine for Stan models

I added an engine for ``Stan`` models. It uses the ``rstan`` package, but loads it using ``getFromNamespace`` so it doesn't need to be indicated in suggests. This engine behaves similarly to the ``Rcpp`` engine in that it creates an object in the knitr environment. The engine takes the contents of the chunk, passes them to ``rstan::stan_model`` in order to compile the model, and then assigns the resulting ``stanmodel`` object to ``opts$x``.