title: Appending result to existing file in R using write.table
body: <p>I have done a text mining on a file in R , then appended it to the existing file as new column. When it is done, the column is added after the actual content. How do I correct this? </p>
  
  <p>The result looks like this:</p>
  
  <pre><code>Customer Names
  T-MAX INDUSTRIAL LTD
  T-MAX INDUSTRIAL LTD.
  ADCHEM
  ADCHEM (AUSTRALIA)
  ADCHEM (AUSTRALIA) PTY LTD
  AUROBINDO PHARMA (AUSTRALIA)
  AUROBINDO PHARMA (AUSTRALIA) PTY
  Aurobindo Pharma (Australia) Pty
  AUROBINDO PHARMA(AUSTRALIA) PTY LTD
  AUROBINDO PHARMA(AUSTRALIA)PTY LTD
  V1
  tmax industrial 
  tmax industrial 
  adchem
  adchem  
  adchem   
  aurobindo pharma  
  aurobindo pharma  
  aurobindo pharma  
  aurobindo pharma   
  aurobindo pharma   
  </code></pre>
  
  <p>But my output must look like this :</p>
  
  <pre><code>Customer Names                           V1 
  T-MAX INDUSTRIAL LTD                    tmax industrial     
  T-MAX INDUSTRIAL LTD.                   tmax industrial     
  ADCHEM                                  adchem  
  ADCHEM (AUSTRALIA)                      adchem      
  ADCHEM (AUSTRALIA) PTY LTD              adchem      
  AUROBINDO PHARMA (AUSTRALIA)            aurobindo pharma    
  AUROBINDO PHARMA (AUSTRALIA) PTY        aurobindo pharma    
  AUROBINDO PHARMA (AUSTRALIA) PTY        aurobindo pharma    
  AUROBINDO PHARMA(AUSTRALIA) PTY LTD     aurobindo pharma    
  AUROBINDO PHARMA(AUSTRALIA)PTY LTD      aurobindo pharma    
  </code></pre>
  
  <p>The code I used is: </p>
  
  <pre><code>result &lt;- data.frame(text=unlist(sapply(b, `[`)), stringsAsFactors=FALSE)
  write.table(result, file="Counter_Party_Testing.csv", sep=".", eol="\n", append=TRUE, row.names=FALSE, col.names=FALSE)
  </code></pre>
  
  <p>and then the result as well Original is converted to dataframe grp1 as Origin , and grp2 as Result , now need help with print statement to print same rows each of both files at a single row in output file using for loop.</p>
  
  <p>i have used this code while print statement throwing some error,</p>
  
  <pre><code>for (n in seq_len(nrow(grp1))) 
  {
      print(grp1[n]+','+grp2[n]+) 
  }
  </code></pre>