title: Convert sentences to words in R
body: <p>I have a data frame in the form of columns - 
  input</p>
  
  <pre><code>Id  Comment
  xc545   Ronald is a great person 
  g6548   Hero worship is bad
  </code></pre>
  
  <p>I need the output in the form of 
  Result</p>
  
  <pre><code>Id  Words 
  xc545   Ronald
  xc545   is
  xc545   a
  xc545   great
  xc545   person
  g6548   Hero
  g6548   worship
  g6548   is
  g6548   bad
  </code></pre>
  
  <p>Need a R statement to execute this.</p>
  
  <p>Following is what I tried - </p>
  
  <pre><code>result&lt;-lapply(input,function(x)strsplit(x[2]," "))
  </code></pre>
  
  <p>However this returns only one record.</p>