title: Splitting text column into ragged multiple new columns in a data table in R
body: <p>I have a data table containing 20000+ rows and one column. The string in each column has different number of words. I want to split the words and put each of them in a new column. I know how I can do it word by word:</p>
  
  <pre><code>Data [ , Word1 := as.character(lapply(strsplit(as.character(Data$complaint), split=" "), "[", 1))]
  </code></pre>
  
  <p>(<code>Data</code> is my data table and <code>complaint</code> is the name of the column)</p>
  
  <p>Obviously, this is not efficient because each cell in each row has different number of words.</p>
  
  <p>Could you please tell me about a more efficient way to do this?</p>