title: Same code is selecting columns in one section and rows in another. Why?
body: <p>I am attempting to select out certain columns from a dataset. I've been using:</p>
  
  <pre><code>dfx &lt;- dfx[c(1,2,3,4)]
  </code></pre>
  
  <p>This has worked previously within this same data set and correctly selects out columns 1-4. But 20 lines later when I use:</p>
  
  <pre><code>dfy &lt;- dfy[c(1,31)]
  </code></pre>
  
  <p>It selects rows 1 and 31. What's going on here, and how can I make it stop. </p>
  
  <p>Thanks. </p>