The data frame looks like (about 10,000 timestamps)
Timestamp           OFR    OFRSIZ   BID BIDSIZ
2015-01-04 09:00:00 375     100     365  10
2015-04-01 09:00:33 369.9   10      365  10
2015-04-01 09:00:36 366     100     367.8 55
2015-04-01 09:00:42 367.45  30      366.4 130
2015-04-01 09:00:43 369.9   10      365   10
2015-04-01 09:00:44 365      5      367.8 55
2015-04-01 09:00:49 369.9   10      365    10
The requirement is a new data frame (New_df) with same timestamp and another column as depth computed as (OFRSIZ+BIDSIZ). Also can the same be applied to xts objects?
 
     
     
    