Use RevBayes with a Graphical Interface

Graphical User Interfaces

There are two main graphical user interfaces (GUIs) that can be used with RevBayes. Below, installation instructions are listed for both.

Jupyter Notebook

First, download and install Python 3 and the Jupyter Notebook. Installation instructions are available from the Jupyter Development team here.

Now, use the Downloads page to find RevBayes compilation instructions for your operating system. When building RevBayes, substitute

./build.sh -jupyter true


for the normal build step. This will generate an rb-jupyter executeable. Add this executeable to your system path.

Finally, clone the RevBayes Jupyter Kernel.

git clone https://github.com/revbayes/revbayes_kernel.git


Change directories into the revbayes_kernel directory and use

sudo python3 setup.py install
python3 -m revbayes_kernel.install
pip3 install metakernel


to deploy the kernel. Now, when launching a Jupyter Notebook, RevBayes should be an available language when starting a notebook.

Examples of RevNotebooks can be found in the RevNotebook repository.

RStudio

Download R and RStudio. Once these are downloaded, start RStudio. Install the devtools package like so:

install.packages("devtools")


Use devtools to install RevKnitr:

devtools::install_github("revbayes/RevKnitr")


Once installation is complete, restart RStudio. rb should now be available as an RMarkdown language.

For ease of use, you might consider adding an RMarkdown chunk to the beginning of any RevMarkdown files that specifies the current working directory and where RevBayes is stored. For example, a markdown cell containing the following information:

{r setup}
knitr::opts_chunk$set(root.dir = "~/projects/RevBayesWork") knitr::opts_chunk$set(engine.pat="~/software/rb")
`

Would tell RMarkdown that the home, or current working directory, is in a directory called “RevBayesWork”, and that the executeable itself is in a folder called software. In this way, the working directory is set for the entire document.