Dear all
I have the following time stamps (in the following format)

MeasurementSet$TimeStamps
       [,1] [,2] [,3] [,4] [,5]   [,6]
  [1,] 2011    7    2   13   43 48.718
  [2,] 2011    7    2   13   43 54.281
  [3,] 2011    7    2   13   43 59.843
  [4,] 2011    7    2   13   44  5.390
  [5,] 2011    7    2   13   44 10.859
  [6,] 2011    7    2   13   44 16.375
  [7,] 2011    7    2   13   44 21.890
  [8,] 2011    7    2   13   44 27.390
  [9,] 2011    7    2   13   44 33.015
 [10,] 2011    7    2   13   44 38.531
 [11,] 2011    7    2   13   44 44.078
 [12,] 2011    7    2   13   44 49.546
 [13,] 2011    7    2   13   44 55.078
 [14,] 2011    7    2   13   45  0.718
 [15,] 2011    7    2   13   45  6.281
 [16,] 2011    7    2   13   45 11.953
 [17,] 2011    7    2   13   45 17.453
 [18,] 2011    7    2   13   45 22.984


I would like to write a function that will have inputs like that:
        function(data, TimeStamps, timeBegin, timeEnd) {(not fixed though)   


and will return the index of start and the end.

I need your help specify how the input arguments should look like  (something simple and compatible with the format I have already should be good).
Then based on that two arguments, how I can search for start and end of timestamps inside the MeasurementSet$Timestamps and return the indexes of start and end of the time block?

I would like to thank you in advance fo ryour help

B.R
Alex

	[[alternative HTML version deleted]]

