I have windspeed readings in 3 directions (u, v and w) at two locations (reference mast6 and sonic_f) for specific wind angles (e.g. 0º, 5º etc) I've imported and rbinded all these into a single data.frame.
I want to plot the data in a pairwise form but the reference mast wasn't recording for the first X seconds. I need to trim the sonic files to the first timestamp that the equivalent reference mast data shows for each Angle and each u v or w direction.
As an example, the start time for each location is as follows:
> aggregate(data=df,StartTime~MeasurementLocation+Angle,min)
Location Angle StartTime
1 mast6_u 00 17602
2 mast6_v 00 17602
3 mast6_w 00 18602
4 sonic_f_u 00 2
5 sonic_f_v 00 2
6 sonic_f_w 00 2
7 mast6_u 05 13001
8 mast6_v 05 13001
9 mast6_w 05 13002
10 sonic_f_u 05 2
11 sonic_f_v 05 2
12 sonic_f_w 05 2
So for example, the start time for all data belonging to angle 00 must be at 18602. EDIT
The desired output would be individual files for each angle, with length of sonic_f_u v or w for Angle==00 to be the same length as the shortest data set from mast_u v or w for the same angle. E.g. for Angle 00, mast6_u v and w must all start at 18602 and so should sonic_f_u v and w.