To view the full wiki, click here: Full healthyverse Wiki
The healthyverse is a comprehensive ecosystem of R packages designed for healthcare data analysis, time-series forecasting, machine learning, and statistical modeling. Inspired by the tidyverse philosophy, the healthyverse packages work in harmony because they share common data representations and API design patterns.
The healthyverse package itself is a meta-package that makes it easy to install and load all core healthyverse packages in a single command, similar to how the tidyverse package works for data science workflows.
You can install the released version of healthyverse from CRAN:
install.packages("healthyverse")
Or install the development version from GitHub:
# install.packages("devtools")
# devtools::install_github("spsanderson/healthyverse")
install.packages("healthyverse", repos = c('https://spsanderson.r-universe.dev', 'https://cloud.r-project.org'))
Loading library(healthyverse) will install and attach the following
core packages:
healthyR - Tools for analyzing common data problems in healthcare administrative data. Includes functions for calculating length of stay, readmission rates, and other healthcare-specific metrics.
healthyR.data - Provides simulated healthcare datasets for testing and learning. Perfect for educational purposes and developing proof-of-concept analyses.
healthyR.ai - AI and machine learning utilities specifically designed for healthcare applications. Features automated model building, evaluation, and prediction workflows.
tidyAML - Automated machine learning (AutoML) framework built on tidymodels. Streamlines the process of training, tuning, and comparing multiple models simultaneously.
TidyDensity - Generate and visualize probability distributions in a tidy format. Makes it easy to work with, compare, and plot various statistical distributions.
RandomWalker - Simulate and analyze random walk processes. Useful for modeling stochastic processes and understanding random behavior in systems.
Simply load the healthyverse to get started:
library(healthyverse)
#> ββ Attaching packages βββββββββββββββββββββββββββββββ healthyverse 1.1.0.9000 ββ
#> β healthyR 0.2.2 β TidyDensity 1.5.2.9000
#> β healthyR.data 1.2.0 β tidyAML 0.0.6.9000
#> β healthyR.ts 0.3.2 β RandomWalker 1.0.0.9000
#> β healthyR.ai 0.1.1.9000
#> Warning: package 'healthyR.ts' was built under R version 4.5.2
#> ββ Conflicts βββββββββββββββββββββββββββββββββββββββ healthyverse_conflicts() ββ
#> β tidyAML::check_duplicate_rows() masks TidyDensity::check_duplicate_rows()
#> β RandomWalker::cmedian() masks TidyDensity::cmedian()
#> β tidyAML::quantile_normalize() masks TidyDensity::quantile_normalize()
This single command loads all seven core packages and displays:
Youβll get an automatic summary of function conflicts when you load the healthyverse. You can check for conflicts at any time:
library(MASS)
healthyverse_conflicts()
#> ββ Conflicts βββββββββββββββββββββββββββββββββββββββ healthyverse_conflicts() ββ
#> β tidyAML::check_duplicate_rows() masks TidyDensity::check_duplicate_rows()
#> β RandomWalker::cmedian() masks TidyDensity::cmedian()
#> β tidyAML::quantile_normalize() masks TidyDensity::quantile_normalize()
Check if any healthyverse packages need updating:
healthyverse_update()
#> The following packages are out of date:
#> * healthyR (0.4.0 -> 0.4.1)
#> * healthyR.ts (0.4.1 -> 0.5)
#> * healthyR.data (0.12.6 -> 0.12.7)
#> Update now?
#>
#> 1: Yes
#> 2: No
Generate a comprehensive report of your R environment and healthyverse package versions:
healthyverse_sitrep()
This is particularly useful when reporting bugs or asking for help, as it provides all relevant version information.
Here are some common use cases for the healthyverse:
Healthcare Data Analysis
library(healthyverse)
# Analyze patient length of stay
# Calculate readmission rates
# Generate healthcare metrics reports
Time-Series Forecasting
library(healthyverse)
# Load historical patient volume data
# Perform seasonal decomposition
# Generate forecasts with confidence intervals
# Visualize trends and predictions
Automated Machine Learning
library(healthyverse)
# Prepare healthcare dataset
# Automatically train multiple models
# Compare model performance
# Select best model for deployment
If you encounter issues or have questions:
https://www.spsanderson.com/{package-name}/
When asking for help, please run healthyverse_sitrep() and include the
output in your issue.
We welcome contributions! Hereβs how you can help:
Please note that the healthyverse project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
If you use the healthyverse in your research or work, please cite it:
citation("healthyverse")
The healthyverse is part of a broader ecosystem of R packages for healthcare analytics:
The healthyverse is in active development. The current version is stable and suitable for production use. See NEWS.md for detailed change logs.
Author: Steven P. Sanderson II, MPH
License: MIT
Website: https://www.spsanderson.com/healthyverse/
ORCID: 0009-0006-7661-8247