summarise_gaps {adheRenceRX}R Documentation

Summarise Gaps in Therapy

Description

This function serves as a convenience wrapper of dplyr::summarise(), which takes the grouped variables and summarises their gaps in therapy. This function is to be used after propagate_date().

Usage

summarise_gaps(.data)

Arguments

.data

Data to be piped into the function

Value

A summary of gaps in therapy

Note

This function relies an adjusted_date column to identify gaps in therapy. So, if you don't want to use propagate_date() beforehand, you'll need to rename the date variable you wish to use to adjusted_date.

Examples

library(adheRenceRX)
library(dplyr)

toy_claims %>% 
  filter(ID == "D") %>% 
  propagate_date(.date_var = date, .days_supply_var = days_supply) %>% 
  summarise_gaps()




[Package adheRenceRX version 1.0.0 Index]