title: variable names are not exported to CSV from R
body: <p>I am trying to generate the frequency table for all the variables in a dataframe. When i export the tables to CSV from R the variable names are not exported to CSV however when viewed in R console the tables appear with variable name. So could anyone help me in getting the variable names to CSV.</p>
  
  <pre><code>data &lt;- read.spss("Test.sav", use.value.labels = TRUE, to.data.frame = TRUE)
  Crossdata &lt;- lapply(data, function(x) xtabs(~x+data$TREND)) 
  data = as.data.frame(do.call(rbind, Crossdata))
  write.csv(data, file = "data.csv")
  </code></pre>