A simple R code to illustrate how to use JAGS for Bayesian inference with R. The MCMC sampling is performed using JAGS on a Bayesian hierarchical model. The code includes the model description, burn-in step, sampling step, multiple chain data binding, trace plots, interval calculation, diagnostics, parallel sampling, etc.