title: R Error - Error in x[j] : only 0's may be mixed with negative subscripts
body: <pre><code>priceSet &lt;- subset(price, price$Source=='xyz', select = c(price$Category, price$AvgPrice))
  </code></pre>
  <p>I am connecting to a SQL Server DB using <code>RODBC</code> package and getting a few fields from the table as above.</p>
  <p>But the subset returns error,</p>
  <pre><code> Error in x[j] : only 0's may be mixed with negative subscripts
  </code></pre>
  <p>The <code>AvgPrice</code> does contain both negative and positive values. And I need to allow that.</p>
  <p>How do I get pass the error?</p>