On Nov 11, 2007 2:28 PM, affy snp <[EMAIL PROTECTED]> wrote: > Hi Gabor, > > I replaced multiple spaces with a single one and tried > the code you suggested. I got: > > > library(sqldf) > Loading required package: RSQLite > Loading required package: DBI > Loading required package: gsubfn > Loading required package: proto > > source("http://sqldf.googlecode.com/svn/trunk/R/sqldf.R") > > myfile <- file("243_47mel_withnormal_expression_log2.txt") > > stmt <- read.table(myfile, nr = 1, as.is = TRUE) > > stmt <- stmt[regexpr("call", stmt) < 0] > > stmt <- paste("select", paste(stmt, collapse = ","), "from myfile") > > myfile <- file("243_47mel_withnormal_expression_log2.txt") > > DF <- sqldf(stmt, file.format = list(sep = " ")) > Error in try({ : > RS-DBI driver: (RS_sqlite_import: > ./243_47mel_withnormal_expression_log2.txt line 6651 expected 488 > columns of data but found 641)
The error message says that its expecting 488 columns but found 641 columns on line 6651. Examine line 6651 to see what is wrong. Also try it with just the first few rows of the file and if that works that is even greater evidence that there is something unexpected with your file. ______________________________________________ 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.