Re: [R] write.table to Excel file

2006-08-31 Thread Kazushige Shimpo
How about using write.csv? Jeff Bricker wrote: > 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 > spreadsheet

Re: [R] write.table to Excel file

2006-08-31 Thread Jeff Bricker
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 <[EMAIL PROTECTED]> wrote: > Hi,

[R] write.table to Excel file

2006-08-31 Thread array chip
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.x