R grouping and summarizing but conditional up to a given date, for each date

Here is my dataframe structure(list(Date = structure(c(19083, 19083, 19083, 19083, 19083, 19083, 19083, 19083, 19083, 19083, 19083, 19083, 19084, 19084, 19084, 19084, 19084, 19084, 19084, 19084, 19084, 19084, 19084, 19084, 19085, 19085, 19085, 19085, 19085, 19085, 19085, 19085, 19085, 19085, 19085, 19085, 19086, 19086, 19086, 19086, 19086, 19086, 19086, 19086, 19086, 19086, 19086, 19086, 19087, … Read more