I have the following data frame:
id day total_amount
1 2016-06-09 1000
1 2016-06-23 100
1 2016-06-24 200
1 2015-11-27 2392
1 2015-12-16 123
7 2015-07-09 200
7 2015-07-09 1000
7 2015-08-27 100018
7 2015-11-25 1000
How can I throw away rows where day column is older than three weeks from today using both base R packages and other packages such as dplyr .