title: How to create a sequence of intervals for allocating a value
body: <p>I'm trying to find the most efficient way to split seconds between session start and end time into 15 minute intervals to I can show the seconds and multiple of the bitrate in each interval.</p>
  
  <p>Here is some sample data:</p>
  
  <p><code>df &lt;- structure(list(username = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 
  7L, 8L, 9L, 9L), .Label = c("user1", "user2", "user3", 
  "user4", "user5", "user6", "user7", "user8", 
  "user9"), class = "factor"), bitrate = structure(c(3500000, 7000000, 
  3500000, 3500000, 3500000, 7000000, 3500000, 7000000, 3500000, 7000000), class = "numeric"), 
      start = structure(c(1322700567, 1322700984, 1322700646, 1322700883, 
      1322700042, 1322700073, 1322700547, 1322700794, 1322700694, 
      1322700934), tzone = "", class = c("POSIXct", "POSIXt")), 
      end = structure(c(1322700766, 1322701250, 1322700945, 1322701270, 
      1322701284, 1322706303, 1322701781, 1322702307, 1322701600, 
      1322701224), tzone = "", class = c("POSIXct", "POSIXt"))), .Names = c("username", 
  "birate", "start", "end"), row.names = c(NA, 10L), class = "data.frame")</code></p>
  
  <pre><code>      username  birate               start                 end
  1     user1 3500000 2011-12-01 01:49:27 2011-12-01 01:52:46
  2     user2 7000000 2011-12-01 01:56:24 2011-12-01 02:00:50
  3     user3 3500000 2011-12-01 01:50:46 2011-12-01 01:55:45
  4     user4 3500000 2011-12-01 01:54:43 2011-12-01 02:01:10
  5     user5 3500000 2011-12-01 01:40:42 2011-12-01 02:01:24
  6     user6 7000000 2011-12-01 01:41:13 2011-12-01 03:25:03
  7     user7 3500000 2011-12-01 01:49:07 2011-12-01 02:09:41
  8     user8 7000000 2011-12-01 01:53:14 2011-12-01 02:18:27
  9     user9 3500000 2011-12-01 01:51:34 2011-12-01 02:06:40
  10    user9 7000000 2011-12-01 01:55:34 2011-12-01 02:00:24
  </code></pre>
  
  <p>></p>
  
  <p>Ideally I want to do this in R if possible, only needs to be for 1 calendar day, with either showing the seconds in a vector or allocating the bitrate vector as a multiple of the seconds, so for example with seconds:</p>
  
  <pre><code>session 01:30   01:45   02:00   02:15   02:30  etc.
     1        0      199      0       0       0  etc.
     2        0      266      0       0       0  etc.
    10        0      306      24      0       0  etc.
  </code></pre>
  
  <p>I was thinking either a sequence by minute or perhaps using xts with align time might be the best approach.</p>