title: Extract words from a column of data.frame
body: <p>In my data, there is a column like :</p>
  
  <pre><code>df &lt;- data.frame(status = c("GET/sfuksd1567","GET/sjsh787","POST/hsfhuks","GET/sfukfiezd17","POST/fshks"), stringsAsFactors = FALSE)
  </code></pre>
  
  <p>I want to create another column automatically which is the indicator of the variable status and it only extracts the "GET" or "POST", like <code>df$ind=c("GET","GET","POST","GET","POST")</code>.</p>
  
  <p>I've tried the function <code>substr</code>, but I didn't success.</p>
  
  <p>Original data:</p>
  
  <pre><code>&gt; df
             status
  1  GET/sfuksd1567
  2     GET/sjsh787
  3    POST/hsfhuks
  4 GET/sfukfiezd17
  5      POST/fshks
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>&gt; df
             status  ind
  1  GET/sfuksd1567  GET
  2     GET/sjsh787  GET
  3    POST/hsfhuks POST
  4 GET/sfukfiezd17  GET
  5      POST/fshks POST
  </code></pre>