I have two data sets in r, each of them having a date column.
First data frame:
>head(df1)
Date values
1 2015-01-01 9.5
2 2015-01-02 11.0
3 2015-01-03 10.2
4 2015-01-04 10.3
5 2015-01-05 9.0
6 2015-01-06 9.0
Second data frame:
>head(df2)
Date values
1 2015-01-01 0.2555918
2 2015-01-17 0.2530624
3 2015-02-02 0.2487910
4 2015-02-18 0.2464284
5 2015-03-06 0.2446288
6 2015-03-22 0.2666028
As you can see, the second data frame had a periodic measure of the data (the measures were taken every 16 days, but there are some breaks, so the measurement isn't continuous). What I want to do is to make a correlation between the data from df1 against df2, but in order to do that I need to get the values of df1 that correspond the registered dates of df2.
Is there a way of doing this?