Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 202012

How to generate matched-pairs based on dates?

$
0
0

I have a dataset that includes dates and count of reports. I am tasked with generating matched-pairs using these guidelines:

  1. Reports will need to be matched to the week immediately prior to or following. (For example: Jan 23, 2000 will be matched with Jan 16, 2000 and Jan 30, 2000)

  2. Holidays must not be included in the final matched-pairs generation.

I have been able to identify the holidays within the dataset but am still stuck on how to generate the matched pairs. Any advice would be much appreciated!

Example of the Data


Viewing all articles
Browse latest Browse all 202012

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>