I have two distinct dataframes, both with a time information column, with different time intervals. The first df1 has time intervals in seconds (~6s) and the other (df2) has time intervals of 10min. I would like to merge both dataframes, keeping the information from both df, repeating df2 values within the time range in df1. Like this:
df1
x y z time
-52 -39 -35 06:08:03
-47 -57 -36 06:08:08
-39 2 -40 06:08:13
-45 -23 -29 06:10:20
-51 -11 -31 06:10:29
-69 -28 -19 06:20:34
df2
time Temp.ar Ur ar Vel. Vento
06:00:00 14.79 78.5 1.147
06:10:00 14.74 78.9 1.045
06:20:00 14.9 78.9 1.009
06:30:00 15.14 78.6 1.076
06:40:00 15.32 77.8 1.332
06:50:00 15.6 76.5 1.216
output that I want
x y z time Temp.ar Ur ar Vel. Vento
-52 -39 -35 06:08:03 14.79 78.5 1.147
-47 -57 -36 06:08:08 14.79 78.5 1.147
-39 2 -40 06:08:13 14.79 78.5 1.147
-45 -23 -29 06:10:20 14.74 78.9 1.045
-51 -11 -31 06:10:29 14.74 78.9 1.045
-69 -28 -19 06:20:34 14.9 78.9 1.009
Time column is already in "POSIXct" format.