This repository hosts slides, data, and vignettes from the January 2025 demo.
The stochtree R package is hosted on Github
and has a dedicated docsite (general and R-specific).
The package is not [yet!] on CRAN, but can be installed directly from Github with
the remotes package as follows
# install.packages("remotes")
remotes::install_github("StochasticTree/stochtree", ref="r-dev")
If you encounter issues with the above installation, it is potentially due to a missing / inaccessible C++ compiler. To troubleshoot, follow the instructions below for your platform.
The recommended compiler toolchain for R packages on MacOS is xcode.
This page from CRAN explains how to install
xcode, as well as any other common MacOS C++ dependencies.
CRAN ships a special compiler / developer software toolchain for Windows called "Rtools". This landing page will help you find the proper version of Rtools for your system (it should be matched to your installed version of R, so if your R console says "R 4.4.2", then you should install Rtools44, and so on.)
The possum (POSterior SUMmarization) package is also available on Github and
can be installed via remotes::install_github
remotes::install_github("spencerwoody/possum")
The vignettes require several other packages which can be installed from CRAN
pkg_list <- c("ggplot2", "latex2exp", "coda", "rpart", "rpart.plot", "tidyverse", "here")
install.packages(pkg_list)