title: Insert column at beginning of a data frame
body: <p>How can I add a column to an R <code>data.frame</code> as a new first column so that all other columns are shifted by one column?</p>
  
  <p>Like:</p>
  
  <pre><code>a|b|c --&gt; new|a|b|c
  </code></pre>
  
  <p>I need to do this because I want the <code>row.names</code> to become a discrete column. This is needed because the <code>write.arff</code> function takes a <code>data.frame</code> as input but does not preserve the names when writing files.</p>