rxGaps {medAdherence} | R Documentation |
rxGaps
function calculate the gaps between the date of dispensation plus days supplies
and the next dispensation date.
rxGaps(df=data,gap=NA)
df |
a dataframe. a object that rxGaps funtion created |
gap |
how to deal with negative gap. Negative gap is kept if any scalar is previded. Otherwise, negative gap is considered as '0', which is the default. |
Xiangyang Ye, Pharmacotherapy Outcomes Research Center, University of Utah
cmos <- rxExampledt() predt <- preRxData(df=cmos,id=ptid,rxDate=rxDay,daySupply=supplies) postdt <-postRxData(predt) rxGaps(postdt)