Hi Jeff,
  My question is not related with SQL.
  I have all the data available in a csv file.
  I am looking for R algorithm where  can specify a time period and then R
essentially uses this time period as a sliding window for all the event-time
stamps and gives
  a significant distribution of occurrences in this dynamic time window.
  Hope that further clarified my question.
  and yes thanks for suggesting roll.apply() from zoo package , let me take
a look.

Also let me know if there are any other alternative suggestions.

Rgds,
Vineet



On Wed, Sep 7, 2011 at 4:48 PM, Jeff Newmiller <jdnewmil@dcn.davis.ca.us>wrote:

> You could phrase this in most dialects of SQL, but you don't say what kind
> of database you are using and this is not a SQL help list.
>
> You could also look at the rollapply function in the zoo package.
> ---------------------------------------------------------------------------
> Jeff Newmiller The ..... ..... Go Live...
> DCN:<jdnewmil@dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---------------------------------------------------------------------------
>
> Sent from my phone. Please excuse my brevity.
>
> Vineet Shukla <shuklvineet@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@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.
>>
>>

	[[alternative HTML version deleted]]

