[R] function for handling time

Daniel Malter daniel at umd.edu
Sat Oct 15 23:26:18 CEST 2011


I find your question impossible to answer as you do not provide any
description of what the matrix columns actually capture and how the variable
in your proposed function relate to the columns of this matrix.

Best,
Daniel


alaios wrote:
> 
> 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]]
> 
> 
> ______________________________________________
> R-help@ mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
> 

--
View this message in context: http://r.789695.n4.nabble.com/function-for-handling-time-tp3907880p3908310.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list