[R] Unable to re-import a table that was just exported to a file

Nigel Birney nan23 at cam.ac.uk
Mon Apr 27 01:38:19 CEST 2009


Hi all,

I am saving a program's output to a file to be read by another algorithm.
But somehow such a simple operation (the reading) fails. I get:

Error in read.table("a_corr_data.txt", sep = ",", col.names = T, row.names =
F) : 
  more columns than column names


Here is the write statement:


write.table(a_corr_data,"a_corr_data.txt",sep=",",col.names=T,row.names=F)

Here is the read statement:

a_corr_data <- 
read.table("a_corr_data.txt",sep=",",col.names=T,row.names=F)

Nothing happens in-between (these actions are just 10-30 secs apart). I
tried to export/import without col.names, also tried different deliminators
("/t") but the same error pops up again and again. I am already quite
unhappy with this.

thanks,

N.

-- 
View this message in context: http://www.nabble.com/Unable-to-re-import-a-table-that-was-just-exported-to-a-file-tp23248010p23248010.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list