On Tue, Mar 1, 2011 at 11:52 PM, xin wei <xin...@stat.psu.edu> wrote: > Dear subscribers: > > I am using the following code to read a large number of big text files: > library(sqldf) > tempd <- file(XXXX) > tempdx <- sqldf("select * from tempd", dbname = tempfile(), file.format = > list(header = T, sep="\t", row.names = F)) > > The problem is: all my numberical variable become factor (maybe because > these columns all contain missing value). It would be quite cubersome to > convert them to numeric variable using as.numeric one by one. Does anyone > know how to re-set SQLDF so that it would automatically read the numeric > column with missing row as real numeric instead of factor? >
If you can provide a minimal ***reproducible*** example it would help. Maybe sqldf(..., method = "raw") will give you what you want but I can't say for sure without the example. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com ______________________________________________ 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.