title: Avoid quotation marks in column and row names when using write.table
body: <p>I have the following data in a file called "data.txt":</p>
  
  <pre><code>pid      1     2     4     15      18       20
  1_at   100   200   89    189     299      788
  2_at     8    78   33     89      90       99
  3_xt   300    45   53    234      89       34
  4_dx    49    34   88      8       9       15
  </code></pre>
  
  <p>The data is separated by tabs.</p>
  
  <p>Now I wanted to extract some columns on that table, based on the information of csv file called "vector.csv", this vector got the following data:</p>
  
  <pre><code>18,1,4,20
  </code></pre>
  
  <p>So I wanted to end with a modified file "datamod.txt" separated with tabs that would be:</p>
  
  <pre><code>pid      18       1     4      20
  1_at   299     100    89     788
  2_at    90       8    33      99
  3_xt    89     300    53      34
  4_dx     9      49    88      15
  </code></pre>
  
  <p>I have made, with some help, the following code:</p>
  
  <pre><code>fileName="vector.csv"
  con=file(fileName,open="r")
  controlfile&lt;-readLines(con)
  controls&lt;-controlfile[1]
  controlins&lt;-controlfile[2]
  test&lt;-paste("pid",controlins,sep=",")
  test2&lt;-c(strsplit(test,","))
  test3&lt;-c(do.call("rbind",test2)) 
  df&lt;-read.table("data.txt",header=T,check.names=F)
  CC &lt;- sapply(df, class)
  CC[!names(CC) %in% test3] &lt;- "NULL"
  df &lt;- read.table("data.txt", header=T, colClasses=CC,check.names=F)
  df&lt;-df[,test3]
  write.table(df,"datamod.txt",row.names=FALSE,sep="\t")
  </code></pre>
  
  <p>The problem that I got is that my resulting file has the following format:</p>
  
  <pre><code>"pid"      "18"       "1"     "4"      "20"
  "1_at"   299         100      89       788
  "2_at"    90           8      33        99
  "3_xt"    89         300      53        34
  "4_dx"     9          49      88        15
  </code></pre>
  
  <p>The question I have is how to avoid those quotation "" marks that appear in my saved file, so that the data appears like I would like to.</p>
  
  <p>Any help?</p>
  
  <p>Thanks</p>