Re: [R] inner join sqldf

2010-03-16 Thread Gabor Grothendieck
Its unlikely that the inner join is what you want. prochi has only 5 levels so the result is going to be enormous. In the second statement you are trying to union incompatible tables. Get an introductory book on SQL and read up on how it works. On Mon, Mar 15, 2010 at 10:39 AM, Newbie19_02 wrot

Re: [R] inner join sqldf

2010-03-15 Thread Newbie19_02
Dear Gabor, require(sqldf) file(description="http://n4.nabble.com/file/n1593282/test_sql_psd.txt";, open="") file(description="http://n4.nabble.com/file/n1593282/test_sql_tsf.txt";, open="") test_sql_psd <- read.table(file="http://n4.nabble.com/file/n1593282/test_sql_psd.txt";, header=TRUE, se

Re: [R] inner join sqldf

2010-03-15 Thread Gabor Grothendieck
The R code posted has syntax errors (there are no quotes around the URL) and the SQL statement also has syntax errors (there is no from clause). Please correct and post again. On Mon, Mar 15, 2010 at 8:19 AM, Newbie19_02 wrote: > > Hi, > > I have two dataframes that have some common columns.   I

[R] inner join sqldf

2010-03-15 Thread Newbie19_02
Hi, I have two dataframes that have some common columns. I would like to join them by the common columns prochi and prescribed_date as there are duplicate prochis but they will be made unique by date. I tried doing an inner join but that just duplicated the columns whereas I would like the inf