title: check if vector contains another vector
body: <p>I want to check whether a vector <code>y</code> contains another vector <code>x</code></p>
  
  <pre><code>y &lt;- c(0,0,0,NA,NA,0)
  x &lt;- c(0,0,0,0)
  </code></pre>
  
  <p>In this case, it should give me <code>FALSE</code> because there is no sequence of four NULL in <code>y</code>. But if we take a look at vector <code>y2</code>, the result should be <code>TRUE</code>.</p>
  
  <pre><code>y2 &lt;- c(0,0,NA,0,0,0,0)
  </code></pre>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>I tried to use <code>%in%</code> but it seems to only work for elements of vectors, not for whole vectors. The solution doesn't have to be applicable to more general problems. It would be nice if it works for this particular case.</p>