mergePeriods: Merge dispensations so that the implied treatment periods are...

Description Usage Arguments Details Value Examples

Description

Merge dispensations so that the implied treatment periods are not overlapping.

Usage

1
mergePeriods(data, dates, doses, cumulative = F)

Arguments

data

The data frame.

dates

The column name containing the dates of treatment initiations.

doses

The column name containing the treatment length.

cumilative

Indicate swhether the days in overlapping treatment periods should accumulate.

Details

Given data with a column of dates ("date") as a date variable, a column of quantity dispensed ("quantity"), mergePeriods(data, "date", "quantity", FALSE) returns an aggregation of data where overlapping periods have been merged to a single period.

Value

A data frame without overlapping periods.

Examples

1

deepchocolate/lega documentation built on July 20, 2020, 12:56 p.m.