Skip to contents

Installing Starsim

Installing Starsim should be straightforward, whether or not you have Python or reticulate already configured on your computer.

  1. Install devtools if you haven’t already:
install.packages("devtools")
  1. Install the R-Starsim package. This installs the R wrapper for Starsim, but not Starsim itself yet.
devtools::install_github("starsimhub/rstarsim")
  1. Load the wrapper:
  1. Finally, we install Starsim itself. This step will also install Python (specifically Miniconda) if needed, and will create a virtual environment (r-starsim) unless it already exists. Note that this step may take some time (3-10 min depending on your computer and internet connection).
  1. You can test the install with ss$demo(), which should run a sim and plot the results.
load_starsim()
ss$demo()

Demo plot