Learning Bayesian Models with R