I have a temperature data name= "dlr_rms" which has 1208783 entries and date-time for those entries and I have to find the absolute error for that data basically I have another table called 'absolute values' which have 21072 temperature values. And I want to subtract those values from my previous data according to shared or grouped date-time.
For Example (df1):
temp date-time
2 2015-07-14 16:44:01
3 2015-07-14 16:44:01
4 2016-08-14 16:44:02
8 2016-08-14 16:44:02
5 2017-09-14 16:44:03
6 2017-09-14 16:44:03
df2:
absolute table date-time
2 2015-07-14 16:44:01
5 2016-08-14 16:44:02
9 2017-09-14 16:44:03
I want the values of shared date-time like (2,3) (4,8) (5,6) to be subtracted from the same number assigned to them in the absolute value table. I also need to join different tables in order to achieve the error calculations
Desired result table
2-2=0
3-2=1
4-5= -1
8-5= 3
5-9 =-4
6-9 = -3
output of dput commands: df1:
1515434400, 1515438000, 1515452400, 1515456000, 1515459600, 1515463200, 1515466800, 1515470400, 1515474000, 1515477600, 1515481200), class = c("POSIXct", "POSIXt"), tzone = "UTC")), class = "data.frame", row.names = c(NA, -21072L))