title: Get everything to the left of ? in a string during dplyr chain with mutate
body: <pre><code>df &lt;- data.frame(
    strings = c('blah?ha', 'foo?bar', 'cats?dogs')
  )
  
  df %&gt;% 
    mutate(first_word = str_split(strings, fixed('?')))
  
       strings first_word
   strings first_word
  1   blah?ha   blah, ha
  2   foo?bar   foo, bar
  3 cats?dogs cats, dogs
  </code></pre>
  <p>This gets me close to my goal. I just want the first part though, blah, foo and cats. Tried:</p>
  <pre><code> df %&gt;% 
  +   mutate(first_word = str_split(strings, fixed('?'))[[1]][[1]])
      strings first_word
  1   blah?ha       blah
  2   foo?bar       blah
  3 cats?dogs       blah
  </code></pre>
  <p>This gives me the same word repeated down the column.</p>
  <p>How can I get a new column with the values blah, foo and cats?</p>