summarise_gaps: Summarise Gaps in Therapy

Description Usage Arguments Value Note Examples

View source: R/Gaps.R

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

1

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

1
2
3
4
5
6
7
library(adheRenceRX)
library(dplyr)

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

btbeal/adheRenceRX documentation built on Dec. 4, 2020, 10:01 p.m.