title: Delete/select sub string in R and create a new columns
body: <p>I have a data which looks like this:</p>
  
  <pre><code>area_fips   area_title
  01000       Alabama -- Statewide
  02000       Alaska -- Statewide
  12000       Florida -- Statewide
  </code></pre>
  
  <p>Now, I want to only select the first two characters for the column or the variable area_flips and create a new variable called state_code containing those two characters so that new data would like this:</p>
  
  <pre><code>area_fips   area_title             state_code
  01000       Alabama -- Statewide   01
  02000       Alaska -- Statewide    02
  12000       Florida -- Statewide   12
  </code></pre>
  
  <p>My use of R especially when it comes to string manipulation unfortunately is not good. I kindly request your help on this. Thank you </p>