title: Filter R xts object to exclude a certain date
body: <p>I would like to subset an <code>xts</code> object to exclude a certain date.  Here is a simple example.</p>
  
  <pre><code># This subsets to March 30, I would like to exclude that date instead
  library(xts)
  xts1 &lt;- xts(x=1:10, order.by=as.Date('2018-03-31')-1:10)
  xts1['2018-03-30']
  </code></pre>
  
  <p>These 2 lines work.</p>
  
  <pre><code>xts1[-which(index(xts1) == '2018-03-30')]
  xts1[!(index(xts1) %in% as.Date('2018-03-30'))]
  </code></pre>
  
  <p>The second of the two above is preferable because it is robust to the date not existing in the <code>xts</code> object.  For example...</p>
  
  <pre><code># returns empty xts
  xts1[-which(index(xts1) == '1960-03-30')]
  
  # returns full xts
  xts1[!(index(xts1) %in% as.Date('1960-03-30'))]
  </code></pre>
  
  <p>It seems like there would be a less verbose and better practice way to do this such as the below (which do not work).</p>
  
  <pre><code>xts1[-'2018-03-30']
  xts1[!'2018-03-30']
  </code></pre>
  
  <p>Is there a better way of doing this than the solutions I have? (i.e. <code>xts1[-which(index(xts1) == '2018-03-30')]</code>, <code>xts1[!(index(xts1) %in% as.Date('2018-03-30'))]</code>)</p>