title: string split and conditional paste
body: <p>I am dealing with a dataframe which is as follows</p>
  
  <pre><code>        id            Comments
          1             The apple fell far from the mango tree
          2             I was born under a mango tree and a wandering star      
          3             Mules are made for packing and Mangoes for eating
  </code></pre>
  
  <p>I am interested in 4 words before the word mango and 4 words after, including the word mango.</p>
  
  <p>The final dataset would appear like this.</p>
  
  <pre><code>        id            Comments
          1             far from the mango tree
          2             born under a mango tree and a      
          3             for packing and Mangoes for eating
  </code></pre>
  
  <p>Here's the test reproducible dataset</p>
  
  <pre><code>df &lt;- read.table(text="Id,Comment
   1,The apple fell far from the mango tree
                   2,I was born under a mango tree and a wandering star      
                   3,Mules are made for packing and Mangoes for eating", header=T, sep=",")
  </code></pre>
  
  <p>Any insight on this much appriciated</p>