[R] finding events in a time duration.

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Wed Sep 7 23:52:42 CEST 2011


I think (no promises) roll.apply() from the zoo package with sum can count occurrences in whatever time period. Then use a logical test to identify sufficiently active periods. 

Hope this helps,

Michael Weylandt

On Sep 7, 2011, at 4:07 PM, Vineet Shukla <shuklvineet at gmail.com> wrote:

> Hi,
> 
> Premises: I have a database which contain the list of events and their time
> stamps  (This is a Unix time stamps)
> 
> What I want to do : I want know how much is the maximum occurrence of this
> in any a time period of 7 days or does a event occur es more than "N" (say
> 5) times in a period of 7 days.
>                               This time period is not fixed with "week
> boundary", its a period of 7 days occurring at any time.
> 
> 
> Question : How it can be done in R. is there a package which can be helpful
> ? if yes then how I can use it.
> 
> 
> Rgds,
> Vineet
> 
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at r-project.org 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.



More information about the R-help mailing list