#' Try to run simple test
#'
#' @return a stanfit model
#' @useDynLib teststan, .registration = TRUE
#' @import rstan
#' @importFrom stats rnorm
#' @export
#'
simple_stan = function(){
y = rnorm(20)
dat = list(N = 20, y = y);
stanfit = stanmodels$test1
sampling(stanfit, data = dat, iter = 200, chains = 1,
show_messages = FALSE)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.