# load rjags (R interface to JAGS) library(rjags) model = "simple_simulations.bug" # we pass the model to JAGS jm <- jags.model(model) # make the simulation, monitoring the four variables chain <- coda.samples(jm, c("x1","x2","x3","x4"), n.iter=10000) # plot the results plot(chain) # print the summaries print(summary(chain))