title: R: write.table include variable names?
body: <p>I have a datafile(math) and then I created ID variable. I tried to combine them into one datafile WITH all the variable names in 'math' and 'id'. </p>
  
  <p>I keep saving the combined file without variable names. I might have not used read.spss or write.table function properly. What did I miss?</p>
  
  <pre><code>math="2009_Math.sav"
  m=read.spss(math,use.value.labels=false)
  mathid&lt;-c(1:65535)
  names(mathid)&lt;-c("id")
  mathfile&lt;-data.frame(math,mathid)
  write.table(m2009, file="math2009.sav",sep=",",row.names=F,col.names=T,quote=F,append=T)
  </code></pre>