title: Writing a tab delimited file from a loop in R (write.table)
body: <p>So I am still an R newb so be gentle ;)
  I basically should be able to figure this out but I think frustration has set in.
  I wish to simply write three columns to a file using write.table (easy enough) but I also wish that it is appended via "\t" separator so my resulting file is a tab delimited txt file.
  I have attached my code which works fine but they are appended via rows so I would love to be able to solve this. Any pointers would be awesome!</p>
  
  <p>Cheers</p>
  
  <pre><code>for(num in 0:10){
    input&lt;-paste("C:\\Users\\Desktop\\non-viewpoint 20-2-14\\HMEC(p9)\\Exp*_HMEC(p9)-IP",num,".txt",sep="")
    files&lt;-Sys.glob(input)
    outfile&lt;-paste("C:\\Users\\Desktop\\non-viewpoint 20-2-14\\exps_HMEC(p9)-IP",num,".txt",sep="")
      exp1&lt;-read.table(files[1],header=TRUE,sep="\t")
      e1&lt;-exp1[grep("9", exp1$Chromosome, invert=TRUE), ]
      write.table(e1$Probe,row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE,outfile)
      exp2&lt;-read.table(files[2],header=TRUE,sep="\t")
      e2&lt;-exp2[grep("9", exp2$Chromosome, invert=TRUE), ]
      write.table(e2$Probe,row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE,outfile)
      exp3&lt;-read.table(files[3],header=TRUE,sep="\t")
      e3&lt;-exp3[grep("9", exp3$Chromosome, invert=TRUE), ]
      write.table(e3$Probe,row.names=FALSE,col.names=FALSE,quote=FALSE,append=TRUE,outfile)    
  
  }
  </code></pre>