Unlocking the Power of Administrative Data with healthyR.data


Steven P. Sanderson II, MPH


July 1, 2024


Hello, fellow data enthusiasts! Today, I’m excited to share insights into the { healthyR.data } package, an essential tool in the healthyverse that will streamline your data exploration and testing processes. Whether you’re a seasoned data scientist or just starting out in data analytics, this package is designed to be valuable for everyone.

What is { healthyR.data }?

The { healthyR.data } package serves two primary purposes: providing a robust administrative data set for testing functions in the { healthyR } package and facilitating the download of important data from the Centers for Medicare and Medicaid Services (CMS), a division of the Department of Health and Human Services (HHS). This package is your resource for comprehensive data that can enhance your analytical capabilities and simplify your testing procedures.

Key Features

1. Comprehensive Administrative Data Set

One of the main features of { healthyR.data } is its extensive administrative data set. This data set is carefully curated to include a variety of scenarios and variables commonly found in healthcare data analysis. This makes it an excellent tool for testing the functions of the { healthyR } package, ensuring your analytical methods are reliable and effective.

2. CMS Data Access

In addition to its built-in data set, { healthyR.data } allows you to download data directly from CMS. This feature is especially useful for healthcare analysts who need up-to-date and detailed data for their analyses. With { healthyR.data }, you can easily access a wealth of information to drive insightful analysis.

Getting Started

To start using { healthyR.data }, you can install it from CRAN with the following command:


Once installed, load the package with:



Load the libraries:

# Functions and their arguments for healthyR

pat <- c("%>%",":=","as_label","as_name","enquo","enquos","expr",

tibble(fns = ls.str("package:healthyR.data")) |>
  filter(!fns %in% pat) |>
  mutate(params = purrr::map(fns, formalArgs)) |> 
  group_by(fns) |> 
  mutate(func_with_params = toString(params)) |>
    func_with_params = ifelse(
        func_with_params, "\\("), 
      paste0(fns, func_with_params), 
      paste0(fns, "(", func_with_params, ")")
    )) |>
  select(fns, func_with_params) |>
  mutate(fns = as.factor(fns)) |>
    #class = 'cell-boarder-stripe',
    colnames = c("Function", "Full Call"),
    options = list(
      autowidth = TRUE,
      pageLength = 10

Using the Administrative Data Set

The administrative data set included in { healthyR.data } is ready for your analytical projects. Here’s a quick example:

# Load the healthyR.data package

# Explore the dataset

This will give you a look at the data and its structure, providing a strong foundation for your analysis.

Downloading CMS Data

Accessing CMS data is simple with { healthyR.data }. The package includes functions that allow you to download various datasets directly from the CMS website. Here’s how:

# Download CMS data
cms_data <- get_cms_meta_data()

# View the downloaded data

This function fetches the latest data from CMS, ensuring your analyses are based on current information.

Latest Updates and Features

The { healthyR.data } package is continually updated, with new features and improvements added regularly. The latest version, 1.1.0, includes several enhancements that make the package even more powerful and user-friendly. For a detailed overview of the latest updates, check out the NEWS section.


In summary, { healthyR.data } is a versatile package that provides essential tools for healthcare data analysis. Whether you’re testing functions from the { healthyR } package or downloading the latest CMS data, { healthyR.data } has you covered. I encourage you to download the package and explore how it can enhance your analytical projects.

Happy coding, and may your data always be insightful!

For more information and detailed documentation, visit the reference page. Stay tuned for more updates and tips on how to get the most out of the healthyverse packages!