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:<jdnew...@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 <shuklvin...@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]] ______________________________________________ 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.