statistical_rethinking-rsuite
Statistical Rethinking ebook built with rsuite
How is this different
This ebook, Statistical Rethinking with brms, ggplot2, and the tidyverse, was created with bookdown. It is different in the way it has been built, and can be rebuilt, helping with reproducibility.
I have used rsuite to make this ebook fully reproducible. This ebook is one of the most difficult that I have found in matching all the dependencies. In addition, it uses stan. After all it is about Bayesian statistics using Stan and rstan. I love this book but, unfortunately, after a R package upgrade it will stop building.
So, what I did is creating an isolated environment for the book, one where all the packages are spelled out in advance so the ebook can be rebuilt after an R re-installation, a new R version, or a full package upgrade. The book will be able to be regenerated to the CRAN snapshot at the time it was first built.
Because rsuite allows a supervising project on top of other projects or packages, you can control the date of the snapshot; the R version under you want the book to be built; the names of all the packages that satisfy the dependencies for the book to work; place the source code of the package if the package is not in CRAN; along with a master project and a master package that takes care of reproducing the whole book, again and again, even after changing the operating system.
How to reproduce this ebook yourself
- Download and install the RSuite client. Available for Linux, Mac and Windows.
- Install the
rsuitepackage withrsuite install - Clone or download this repository.
- Change to this repo folder and install the dependencies on its own isolated reproducible environment. Use
rsuite proj depsinst - Build the project with
rsuite proj build - Go to the folder
/work/bookand open the projectStatistical Rethinking with brms, ggplot2, and the tidyverse.Rproj. - Click on the RStudio
Build book - Enjoy