title: R - stop write.xlsx() from making column names syntactically valid
body: <p>I do have a specific question regarding the <code>write.xlsx()</code> function of the <code>xlsx</code> package in R.</p>
  
  <p>I do have a matrix containing outputs of panel data regressions. For convenience I do want to export these outputs to a .xlsx file to include it in a Word document. However, when I do export the matrix via <code>write.xlsx</code> the column names are automatically edited to the syntactically valid style with no symbols other than points, letters and numbers. So, the column vector of the matrix</p>
  
  <p><code>table_columns &lt;- c("Estimate (All periods)", "", "s.e. (All periods)", "Estimate (Periods 0 &amp; 1)", "", "s.e. (Periods 0 &amp; 1)")</code></p>
  
  <p>(<code>""</code> are empty column names because these columns contain star indicators for p-values)
  becomes</p>
  
  <p><code>Estimate..All.periods.|V2|s.e...All.periods.|Estimate..Periods.0...1.|V5|s.e...Periods.0...1.</code></p>
  
  <p>Is there a way to suppress this reformatting such that I do not need to edit the .xlsx file after output?</p>
  
  <p><strong><em>-Edit-</em></strong> to make things easier to understand:</p>
  
  <p>I do have a vector <code>table_rows</code> with 
  <code>c("All periods", "  Std. error (All periods)", "Periods 0 &amp; 1", "  Std. error (Periods 0 &amp; 1)")</code>
  and a vector <code>table_columns</code> with <code>c("(1) 1AM - 6AM", "", "(2) 6AM - 10AM", "", "(3) 10AM - 6PM", "", "(4) 6PM - 10PM", "", "(5) 10PM - 1AM", "", "(6) Daily", "")</code></p>
  
  <p>These are used to set the dimnames of the matrix <code>table</code>
   with <code>matrix(c(table_1, table_1p, table_2, table_2p, table_3, table_3p, table_4, table_4p, table_5, table_5p, table_6, table_6p), 4, 12, dimnames = list(table4_rows, table4_columns))</code></p>
  
  <p>where <code>table_odd</code> and <code>table_oddp</code> denote the column vectors containing estimantes and their p-level indicators and <code>table_even</code> the standard errors in parantheses. All vectors are of type <code>chr</code></p>
  
  <p>I do run <code>write.xlsx(table, paste0(getwd(), "/results.xlsx"), sheetName = "Results")</code> to convert the matrix to .xlsx</p>