r - Keeping the structure of my matrix when writing for use in excel (column headings) -


I should be able to place row and column headings above the respective columns and rows. I export using data:

  writeable (matrix, "filepath.txt", sep = ",", col.names = TRUE, row.names = TRUE, quote = FALSE, Na = "NA")  

The structure of the matrix in R

  --- call 1 call 2 call 3 row 1 - - - cry 2 - - - Row 3 After writing my matrix and opening in Excel I get:  
  Col1 Col2 Col3 Row1 - - - Row 2 - - - Row 3 - - - - Row With no empty cell above the headings  

My matrix is ​​very large, so be excel in Excel Yes and it is not possible to manually change each manually.

Is anyone else facing this? (I did a quick search through the site and could not find any answer) any solution to force my desired alignment?

Try:

  write.csv (matrix, "Filepath.txt", line.Name = TRUE, quotation = FALSE, NA = "NA")  

This should fix the first cell problem!


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -