I have a sorted list of descending dates. How do I get a probability history of the difference between the date on the current line and the date on the next line? I want to visualize the frequency of how often requests come in.
09/11/2011 13:46:39
09/11/2011 13:45:18
09/11/2011 13:44:58
09/11/2011 13:40:02
09/11/2011 13:37:58
09/11/2011 13:36:09
09/11/2011 13:32:31
09/11/2011 13:25:29
09/11/2011 13:24:40
09/11/2011 13:23:48
p.s. I’ve never used R before, so the more code the better. Thanks.
Read the data
Convert to
POSIXctdateLoad
latticeand plot with the time differences withhistogram.The function
diffis very handy to calculate lagged differences. You will notice that I also useunclassthis is because there is no histogram method for classdifftime.