Re: [R] write.table to Excel file

From: Jeff Bricker <jdbricker_at_gmail.com>
Date: Fri 01 Sep 2006 - 01:19:32 GMT

from ?write.table:

     By default there is no column name for a column of row names.  If
     'col.names = NA' and 'row.names = TRUE' a blank column name is
     added, which is the convention for CSV files to be read by
     spreadsheets.


On 8/31/06, array chip <arrayprofile@yahoo.com> wrote:
> Hi, I found that when writing a matrix with row names
> and column names to an Excel file, the Excel file when
> opened has column names shifted towards left resulting
> disalignment. Here is an exmaple
>
> x<-matrix(1:20,nrow=4,dimnames=list(paste('r',1:4,sep=''),paste('c',1:5,sep='')))
> write.table(x,"xx.xls",sep='\t')
>
> If you open the xx.xls file, you will understand what
> I meant. Is there anyway to solve the disalignment?
>
> Thanks
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
>
https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri Sep 01 17:32:13 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 07 Sep 2006 - 07:51:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.