Skip to contents

Overview

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.

Why healthyverse?

  • πŸ₯ Healthcare Focus: Purpose-built tools for analyzing administrative healthcare data, patient records, and medical time-series
  • πŸ”„ Consistent API: All packages follow similar design patterns, making them easy to learn and use together
  • πŸ“Š Comprehensive Toolkit: From data cleaning to machine learning, all tools you need in one ecosystem
  • ⚑ Workflow Efficiency: Load all packages at once and get notified of any function conflicts
  • πŸ” Dependency Management: Built-in tools to check package versions and update the entire suite

Installation

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")

Core Packages

Loading library(healthyverse) will install and attach the following core packages:

Data Analysis & Management

  • 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.

Time-Series & Forecasting

  • healthyR.ts - Comprehensive time-series analysis and forecasting functions optimized for healthcare data patterns. Includes tools for seasonal decomposition, trend analysis, and automated forecasting.

Machine Learning & AI

  • 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.

Statistical Distributions & Simulation

  • 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.

Usage

Getting Started

Simply load the healthyverse to get started:

library(healthyverse)
#> ── Attaching packages ─────────────────────────────── healthyverse 1.1.0.9000 ──
#> βœ” healthyR      0.2.2          βœ” TidyDensity   1.5.2     
#> βœ” healthyR.data 1.2.0          βœ” tidyAML       0.0.6.9000
#> βœ” healthyR.ts   0.3.1          βœ” RandomWalker  1.0.0.9000
#> βœ” healthyR.ai   0.1.1.9000
#> ── 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:

  • βœ… Which packages were loaded and their versions
  • ⚠️ Any conflicts with functions from other loaded packages

Managing Conflicts

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()

Keeping Packages Updated

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

Getting a System Report

Generate a comprehensive report of your R environment and healthyverse package versions:

This is particularly useful when reporting bugs or asking for help, as it provides all relevant version information.

Example Workflows

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

Getting Help

If you encounter issues or have questions:

  1. πŸ“– Documentation: Each package has extensive documentation at https://www.spsanderson.com/{package-name}/
  2. πŸ› Bug Reports: File issues at github.com/spsanderson/healthyverse/issues
  3. πŸ’¬ Discussions: Use GitHub Discussions for questions and community support
  4. πŸ“§ Contact: Reach out to the maintainer at

When asking for help, please run healthyverse_sitrep() and include the output in your issue.

Contributing

We welcome contributions! Here’s how you can help:

  • πŸ› Report bugs and suggest features via GitHub Issues
  • πŸ“ Improve documentation by submitting pull requests
  • πŸ§ͺ Add tests to increase code coverage
  • πŸ’‘ Share use cases and examples with the community
  • ⭐ Star the repo to show your support

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.

Citation

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:

  • tidyverse - The inspiration for healthyverse’s design philosophy
  • tidymodels - Framework for modeling and machine learning
  • forecast - Time-series forecasting methods

Package Status

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