title: Getting Initials from a name in R
body: <p>I'm sure there's a more eloquent way:</p>
  
  <pre><code>NAMES &lt;- data.frame(ID = "George Washington")
  NAMES$ID &lt;- as.character(NAMES$ID)
  
  gsub(" ", "", paste(substr(data.frame(strsplit(NAMES$ID, " "))[[1]], 1, 1), collapse=" "))
  </code></pre>
  
  <p>[1] "GW"</p>