title: Write col names while writing csv files in R
body: <p>What is the proper way to append col names to the header of csv table which is generated by <code>write.table</code> command?
  For example <code>write.table(x, file, col.names= c("ABC","ERF"))</code> throws error saying <code>invalid col.names specification</code>.Is there way to get around the error, while maintaining the function header of <code>write.table</code>.</p>
  
  <p>Edit:
  I am in the middle of writing large code, so exact data replication is not possible - however, this is what I have done:
  <code>write.table(paste("A","B"), file="AB.csv", col.names=c("A1","B1"))</code> , I am still getting this error <code>Error in write.table(paste("A","B"), file="AB.csv", col.names=c("A", : invalid 'col.names' specification.</code></p>