I asked a similar question before and got a lot of help: R: Aggregating history by ID by date
The difference was that for the previous post it was interesting for me to combine ALL historical information, but now I hope to indicate only 90 days ago.
Here is an example of how my data might look:
strDates <- c("09/09/16", "5/7/16", "5/6/16", "2/13/16", "2/11/16","1/7/16",
"11/8/16","6/8/16", "5/8/16","2/13/16","1/3/16", "1/1/16")
Date<-as.Date(strDates, "%m/%d/%y")
ID <- c("A", "A", "A", "A","A", "A", "B","B","B","B","B", "B")
Event <- c(1,0,1,0,1,1, 0,1,1,1,0, 1)
sample_df <- data.frame(Date,ID,Event)
Like the conclusion:

Background Information
I want to save all the attached information to the meeting, but then summarize the following historical information by identifier for up to 90 days.
- Number of previous meetings in the last 90 days
- The number of previous events over the past 90 days.
Example
As an example, consider line 2.
2 - A, 3-6 ( Row 2 Encounter). , 3,4,5 90 , 6 - .
90 . 2: 3
90 2: 2 (5/6/16 2/11/16)
:
