Each HADES package site describes how you can install that individual package (including its dependency). On this page you will learn how you can install all HADES packages in one go, or update any HADES packages you have already installed. But before proceeding, make sure you have R, RTools (for Windows) and Java installed properly, as described here. Please don’t forget to ensure you have set a GitHub Personal Access Token (PAT) as described here. Else we will hit our GitHub download limit, and the installation will fail.

Installing all HADES packages

We install the HADES packages from GitHub using the remotes package:

# This line prevents the annoying "Do you want to install from source" dialogs:
options(install.packages.compile.from.source = "never")

install.packages("remotes")
library(remotes)
install_github("ohdsi/Hades", upgrade = "always")

Note that we use upgrade = "always" to avoid having to answer any questions about whether we want to upgrade any packages. HADES is designed to work with the latest released versions of all its dependencies, so we should always upgrade these (unless we’re running an older study package, which is an entirely different story).

When asked “Do you want to install from source the packages which needs compilation”, I recommend you choose “No”. Compiling these packages may take a very long time, and it is unlikely they contain functionality needed to run HADES (since HADES was likely developed with the previous version).

Updating HADES

If we already have the HADES packages installed, and wish to upgrade to the latest versions, we can also use the remotes package:

# This line prevents the annoying "Do you want to install from source" dialogs:
options(install.packages.compile.from.source = "never")

library(remotes)
update_packages()

HADES-wide releases

At the end of quarter 1 and 3 of each year a HADES-wide release is created. This is a snapshot of all HADES packages and their dependencies at one point in time. Additional checks are executed to ensure all packages and their dependencies work together. As such, these HADES-wide releases form a stable foundation for studies that may not require the absolute cutting-edge in HADES functionality.

These releases are currently captured as renv lock files. The following releases are available:

To build the R library corresponding to the latest release in your current RStudio project, you can use:

download.file("https://raw.githubusercontent.com/OHDSI/Hades/refs/heads/main/hadesWideReleases/2024Q3/renv.lock", "renv.lock")
install.packages("renv")
renv::restore()