title: how to separate a col into mutiple cols without knowing the final col number ahead of time?
body: <p>If I have a df and I want to separate <code>player</code> by <code>sep=&quot;_&quot;</code>. Is it a smart way that I can do this without manually check how many col I will need? For my example, it is easy to tell I need to separate <code>player</code> into 3 new cols. What is I have 100+ rows. Is it a way to tell how many cols I need to separate <code>player</code> into? or is it a way to split <code>player</code> without knowing this info?</p>
  <pre><code>df &lt;- data.frame(player=c('John_Wall', 'Dirk_Nowitzki', 'Steve_Nash_try'),
                   points=c(22, 29, 18),
                   assists=c(8, 4, 15))
  ## current method:
  df %&gt;% separate(player, c('v1', 'v2', 'v3'), sep =&quot;_&quot;)
  </code></pre>