I have time as my variable v1 and occupancy rate as my v2.
   Interval    Percentage
    18:00:00   100%
    18:00:00    99%
    18:00:00    98%
    18:00:00   100%
    18:30:00    89%
    18:30:00    88%
    18:30:00    90%
    19:00:00    93%
    19:00:00    92%
    19:00:00    93%
Say I want to take the average of occupancy for interval 18:00:00, how am I supposed to do with R? I tried the following:
library(plyr)
ddply(B, .(B$Interval), summarize, mean_y=mean(B$Percentage)) 
   B$Interval     mean_y 
1    18:30:00  0.6795594 
2    18:35:00  0.6795594 
3    18:40:00  0.6795594
4    18:45:00  0.6795594
5    18:50:00  0.6795594
6    18:55:00  0.6795594
7    19:00:00  0.6795594
 
    