Want to know as soon as a new healthiar version is released? See Stay updated below.
Introduction
healthiar is an R package to quantify and monetize health impacts attributable to exposure (e.g. air pollution, noise…) in a study area. Using healthiar, you can …
-
Quantify health impacts choosing among multiple input data formats and calculation pathways:
Exposure data as single value or as distribution
Relative risk or absolute risk
Fixed-shape or user-defined exposure-response functions
Single or age-specific baseline health data (life table approach)
Iterate across geographical units
Compare scenarios
Include and summarize uncertainties
Monetize health impacts or perform cost-benefit analyses adjusting for inflation and discounting
Consider social inequalities in the assessment and stratify the results
Getting started
You have different materials to learn about the R package healthiar.
Cheat sheet
Have a quick and visual look at the cheat sheet 
Vignette
Read the vignette (~ package manual) intro_to_healthiar, which you can access
on the package website (recommended)
in R Studio: Click on the Packages tab in RStudio, scroll down to the healthiar package and clicking on the hyperlinks healthiar > User guides, package vignettes and other documentation
in the web browser: Run
browseVignettes("healthiar")in the R console and the page will open up in your browser
Function documentation
See the function help pages for information about specific functions. In RStudio, you can access the function documentation of e.g. the function attribute_health by
going to the reference page of the package website
running
?attribute_healthin RStudio (withhealthiarloaded)going to the
Packages taband then clicking onhealthiar
Video
Watch a 45 minutes video from an online international workshop (30 September 2025), which can be found here. The slides of the presentation can be found here.
Stay updated
We regularly improve healthiar and publish a new GitHub release every time a new version reaches CRAN. To make sure you don’t miss one:
Watch releases: on the GitHub repo, click Watch > Custom > tick Releases only, so you get notified without being flooded by every issue or discussion.
Star the repo: click Star on the GitHub repo to bookmark it and help others discover healthiar.
Subscribe via RSS/Atom: if you prefer a feed reader, subscribe to https://github.com/SwissTPH/healthiar/releases.atom.
Check the changelog: see what changed in each version on the changelog.
Each GitHub release is also archived on Zenodo (DOI: 10.5281/zenodo.18220360) if you need to reference a specific version snapshot rather than the package itself.
Installation
We recommend frequently installing the newest healthiar version. Please note that healthiar requires R version 4.2.0 or higher. There are two options to install healthiar:
- From CRAN:
1.- Click on the Packages tab in RStudio and on the Install button.
2.- Leave the Install from: option set to Reporsitory (CRAN).
3.- Search and select healthiar.
4.- Click on Install keeping Install dependencies activated.
- From Github (most recent version): Run the following commands below in RStudio:
1.- Install the package remotes (if not already installed):install.packages("remotes")
2.- Install healthiar: remotes::install_github(repo = "SwissTPH/healthiar", build_vignettes = TRUE, dependencies = TRUE)
Note that you may be prompted to install or update additional packages dependencies required by healthiar.
After installation, do not forget to load the package by running the call library(healthiar).
Citation
We love that you use healthiar. In that case, please do not forget to cite healthiar in your work. Three options to get there:
On the healthiar package website
See CITATION.R
In your R console, enter citation(“healthiar”).
In options b) and c), you always see the updated citation. In option a), you see citation of the healthiar version that you have installed locally, which might be outdated.
Disclaimer and licence
By using healthiar, you confirm that you agree with the following disclaimer and terms of the licence:
Disclaimer: The R package healthiar is work in progress and the developers are not liable for the results.
License: Available here.
Contributions
We welcome your contributions! Do you want to report a bug, provide code or just make a question/comment? Please, read and follow the guidelines of our guide for contributions By contributing to healthiar, you agree to abide by our code of conduct.
Presenting healthiar
If you would like us to present healthiar at a conference, lecture or training, please, contact us: alberto.castrofernandez@swisstph.ch and axel.luyten@swisstph.ch.
Acknowledgements
healthiar was been developed under the framework of EU project BEST-COST. BEST-COST is funded by the European Union’s Horizon Europe programme under Grant Agreement No.101095408.
Special thanks to our community members who submitted bug reports, suggested improvements, and provided valuable feedback to refine this package. Here some of them in alphabetical order: Federico Cussotto, Georgia Dyer, Brecht Devleesschauwer, Nicole Engelmann, Aletta Karsies, Sasha Kohmenkho, Heli Lehtomäki, Matthias Lochman, Enrico Pisoni, David Rojas Rueda & Maciek Strak.
