title: R - Filtering time series
body: <p>I have a time series</p>
  
  <pre><code>mainTimeSeries &lt;- data.frame(time=seq(as.POSIXct("2012/1/1"), as.POSIXct("2012/1/5"), "hour"), value=sample(1:10, 1))
  </code></pre>
  
  <p>I want to filter out all the data which is present in another series   </p>
  
  <pre><code>badTimeSeries&lt;-data.frame(startTime=seq(as.POSIXct("2012/1/3"), as.POSIXct("2012/1/4"), "hour"))
  badTimeSeries$endTime &lt;- badTimeSeries$startTime + 1800
  </code></pre>
  
  <p>Is there an existing function to filter out dates ? The results should be such that no element of mainTimeSeries should be between startTime and endTime of badTimeSeries.</p>