Description Usage Arguments Details Value Examples
Merge dispensations so that the implied treatment periods are not overlapping.
1 | mergePeriods(data, dates, doses, cumulative = F)
|
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. |
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.
A data frame without overlapping periods.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.