yihui/knitr — pull request #903 by jrnold (2014-11-28 04:41:38+00:00)
Title: Added engine for Stan

A do-over of pull request #902

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.