title: How to present R variable as a code line?
body: <p>I'm trying to create a loop over a subset function, and for that I stored the subset rules in a variable (taking data from the Mat list that has all the conditions):</p>
  
  <pre><code>all &lt;- paste("newdat, ", Mat[,2][j],  sep="")
  all 
  
  [1] "newdat, newdat$num_recent_claims&gt;=2.5 &amp; newdat$tpv_max_ratio&lt;0.0141 &amp; newdat$num_recent_claims&gt;=5.5 "
  </code></pre>
  
  <p>How can I use that variable in the subset function so it will use the string as subset conditions?
  Currently not working:</p>
  
  <pre><code>badpop &lt;- subset(all)
  </code></pre>
  
  <p>any ideas?</p>