Re: [R] a question on sqldf's handling of missing value and factor

2011-03-16 Thread xin wei
Dear Gabor: I did not have time to look at this issue these few days. Now I saw your investigation. I am very grateful that you quickly identify the root cause of this. It seems that a little caution needs to be exercised when applying sqldf to text file with large number of blanks (I have no contr

Re: [R] a question on sqldf's handling of missing value and factor

2011-03-02 Thread Gabor Grothendieck
On Wed, Mar 2, 2011 at 10:17 AM, xin wei wrote: > I am sorry for posting the wrong source file. the correct source file is as > follows: > a       b       c > aa              23 > aaa     34.6 >            77.8 > > They are tab delimited but somehow could not be displayed correctly in > brows

Re: [R] a question on sqldf's handling of missing value and factor

2011-03-02 Thread xin wei
Dear Mr. Grothendieck : thank you so much for your attention. You are the real expert here. the following is a mock text file: a b c aa 23 aaa 34 77 note that both b and c column contain missing value (blank) I save it under my C drive and use bo

Re: [R] a question on sqldf's handling of missing value and factor

2011-03-02 Thread xin wei
I am sorry for posting the wrong source file. the correct source file is as follows: a b c aa 23 aaa 34.6 77.8 They are tab delimited but somehow could not be displayed correctly in browser. -- View this message in context: http://r.789695.n4.nab

Re: [R] a question on sqldf's handling of missing value and factor

2011-03-02 Thread Gabor Grothendieck
On Tue, Mar 1, 2011 at 11:52 PM, xin wei wrote: > Dear subscribers: > > I am using the following code to read a large number of big text files: > library(sqldf) > tempd <- file() > tempdx <- sqldf("select * from tempd", dbname = tempfile(), file.format = > list(header = T, sep="\t", row.names

[R] a question on sqldf's handling of missing value and factor

2011-03-01 Thread xin wei
Dear subscribers: I am using the following code to read a large number of big text files: library(sqldf) tempd <- file() 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 facto