title: R - splitting a string one character after a space
body: <p>I have postcode data in R that looks like this:</p>
  
  <pre><code>Postcodes
  AB4 6JK
  AR14 8UI
  D4 9IK
  CB3 9EU
  </code></pre>
  
  <p>But I want to split the postcodes into postcode sectors, which includes everything one character after the space, so that they look like this:</p>
  
  <pre><code>Postcodes
  AB4 6
  AR14 8
  D4 9
  CB3 9
  </code></pre>
  
  <p>I've found lots of Q&amp;As which focus on separating out strings based on spaces, such as <a href="https://stackoverflow.com/questions/38669267/r-splitting-a-column-of-character-separated-by-different-number-of-spaces">here</a> and <a href="https://stackoverflow.com/questions/14562623/split-an-uneven-character-string-in-r-with-space">here</a>, but how do I specify to split out one character after the space?</p>
  
  <p>The postcodes are not fixed lengths. </p>
  
  <p>I intend to aggregate the postcode data afterwards based on the higher-level postcode sector. </p>