title: Select column dataframe index R
body: <p>I have a data frame df like this</p>
  
  <pre><code>1    2    3    4
  
  A    B     C   A
  </code></pre>
  
  <p>where the colnames are {1,2,3,4}. I would like to select one of the column of the data frame according to an index that I set externally</p>
  
  <pre><code>colf &lt;- as.numeric(mo)
  fmo &lt;- df[[colf]]
  </code></pre>
  
  <p>Many thanks,</p>