I have the data frame as I have below. I want to examine all Intake frequencies with "03 Month". My mission is to remove any Intake that is far away from three months by comparing the dates. Intake stands for when a client first register with an agency. 03 Month is three months follow up.
I am running R version 3.3.2 in Window environment.
I have taking the difference between the current date and the previous date in days. However, it is not straight forward to eliminate the observation with less than 90 days and greater than say 100 days as some patient has only intake and no follow up which i will like to keep.
Any help please.
ID DATE FREQ
1 08/09/2014 Intake
1 27/03/2015 Intake
1 01/09/2015 Intake
1 07/12/2015 03 Months
1 18/03/2016 06 Months