Using R to study temporal alignment

#1
Hello,

I'm new to R, and not a stats specialist at all.

For an user experiment, I've collected data.
My data consists in 2 variables.
The first one, v1, is ponctual in time.
The second one, v2, is continuous.
Both variables are coordinates.

I want to use R to study the temporal alignment between the 2. That is, for a temporal window centered on v1 events, I want to know where is v2 on average.

However, I have no idea of how to use R to achieve this. All I can do is displaying a graph with the timestamps as the X-axis and the values of v1 and v2 as the Y-axis. Of course, it makes a graph that is almost impossible to read.

Thank you so much for your help.

Pierre