Interface to 'JuliaBUGS.jl' from R

Provides an R interface to the 'JuliaBUGS.jl' package (< https://github.com/TuringLang/JuliaBUGS.jl>) for Bayesian inference using the BUGS modeling language. Allows R users to run models in Julia and return results as familiar R objects. Visualization and posterior analysis are supported via the 'bayesplot' and 'posterior' packages.


rjuliabugs

License:MIT

rjuliabugs is an R package that provides a bridge between R and JuliaBUGS, the BUGS-style Bayesian modeling interface developed in Julia as part of the Turing.jl probabilistic programming ecosystem.

JuliaBUGS allows users to define models using the familiar BUGS syntax while leveraging the speed and flexibility of the Julia language. It enables automatic translation of BUGS code into modern probabilistic programs that run efficiently with advanced inference engines such as Hamiltonian Monte Carlo (HMC) — all accessible via Turing.jl.

With rjuliabugs, R users can run BUGS models/code through JuliaBUGS and take advantage of the inference algorithms available in Turing.jl, without leaving the R environment. This not only provides a seamless path to adopt faster (including parallelization) and more flexible sampling methods but also allows integration with R’s extensive post-processing ecosystem (e.g., bayesplot, posterior, coda). It lowers the barrier for existing BUGS users to adopt modern Bayesian tools without abandoning their existing model codebase.

Installation

You can install the development version of rjuliabugs from GitHub with:

# install.packages("remotes")
remotes::install_github("MateusMaiaDS/rjuliabugs")

⚠️ Loading the package:
When starting a R session for the first time, after loading the package rjuliabugs and before running any function, we recommend to run rjuliabugs::setup_juliaBUGS() to build all Julia setup in R and install any needed dependencies. We recommend this initially as it an be time-consuming. See ?rjuliabugs::setup_juliaBUGS for more details.

For further guidance, there articles in this page which summarize most of the FAQ and additional instructions for installing Julia and setting rjuliabugs, troubleshooting, and running rjuliabugs in parallel. We recommend the reading of them before working with rjuliabugs:

Contributing

Contributions are welcome! If you encounter a bug or have a feature request, please open an issue.

License

This package is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

This project is part of a Google Summer of Code 2025 initiative under the Turing.jl organization. The mentors were Xianda Sun and Robert Goudie.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("rjuliabugs")

0.1.0 by Mateus Maia, a year ago


https://mateusmaiads.github.io/rjuliabugs/


Report a bug at https://github.com/MateusMaiaDS/rjuliabugs/issues


Browse source code at https://github.com/cran/rjuliabugs


Authors: Mateus Maia [aut, cre] , Xianda Sun [aut] , Robert Goudie [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports coda, JuliaCall, posterior

Suggests bayesplot, knitr, rmarkdown, gridExtra, rstan, nimble

System requirements: Julia (>= 1.10.8) with the following packages installed: 'JuliaBUGS.jl', 'LogDensityProblemsAD.jl', 'ReverseDiff.jl', 'AdvancedHMC.jl', 'AbstractMCMC.jl', 'LogDensityProblems.jl', 'MCMCChains.jl', 'RCall.jl', 'Suppressor.jl'.


See at CRAN