On Sun, Apr 26, 2009 at 7:38 PM, Nigel Birney <na...@cam.ac.uk> wrote: > > 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.
?read.table You might find that you are using col.names and row.names wrongly in the read.table command. Best wishes, Berwin =========================== Full address ============================= Berwin A Turlach Tel.: +65 6516 4416 (secr) Dept of Statistics and Applied Probability +65 6516 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16, Level 7 e-mail: sta...@nus.edu.sg Singapore 117546 http://www.stat.nus.edu.sg/~statba ______________________________________________ R-help@r-project.org 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.