title: Check if list contains another list in R
body: <p>I want to check if a list (or a vector, equivalently) is contained into another one, not if it is a subset of thereof. Let us assume we have</p>
  
  <pre><code>r &lt;- c(1,1)
  s &lt;- c(5,2)
  t &lt;- c(1,2,5)
  </code></pre>
  
  <p>The function should behave as follows:</p>
  
  <pre><code>is.contained(r,t) 
  [1] FALSE
  # as (1,1) is not contained in (1,2,5) since the former 
  # contains two 1 whereas the latter only one.
  
  is.contained(s,t)
  [1] TRUE
  </code></pre>
  
  <p>The operator <code>%in%</code> checks for subsets, hence it would return <code>TRUE</code> in both cases, likewise <code>all</code> or <code>any</code>. I am sure there is a one-liner but I just do not see it.</p>