title: How to eliminate strings from a list given that those strings are not included in another string and put them in a formula?
body: <p>I have a list of strings and another string that contains a subset of those strings. I need to substract the subset of strings from the first list, and then I need to put the output in a R formula.</p>
  
  <p>For example:</p>
  
  <pre><code>total &lt;- c("Blue", "Black", "Green","Red", "White", "Yellow")
  small &lt;- c("Blue", "Red")
  
   Output &lt;- total - small
  </code></pre>
  
  <p>What I got:</p>
  
  <pre><code>Error in Output : 
    non-numeric argument to binary operator
  </code></pre>
  
  <p>What was the expected result:
  [1] "Black" "Green" "White" "Yellow"</p>
  
  <p>Then I want to separate the elements of Output by a + and put this in a R formula:</p>
  
  <pre><code>myFormula &lt;- as.formula(paste(Output, sep=" + "))
  </code></pre>