Skip to content
Back to formatted view

Raw Message

Message-ID: <CAP01uRn=bhYwcfuJ0SCaGJc6n-C=3DQ3vhr=av+zfg_ojYukDA@mail.gmail.com>
Date: 2011-11-09T01:22:13Z
From: Gabor Grothendieck
Subject: multi-line query
In-Reply-To: <CAG2PC+dzh4SX2JwFoQS5EGP1+7bjQD-r20JLKQgf6aD0Mx=Tyw@mail.gmail.com>

On Tue, Nov 8, 2011 at 1:04 PM, Ben quant <ccquant at gmail.com> wrote:
> Because I don't know anything about sqldf. :)
>
> Here is what happens, but I"m sure it is happening because I didn't read
> the manual yet:
>
>> s <- sqldf('create table r.dat("id" int primary key,"val" int)')
> Error in ls(envir = envir, all.names = private) :
> ?invalid 'envir' argument
> Error in !dbPreExists : invalid argument type
>

Assuming you have loaded RpgSQL and sqldf it works for me so there is
likely some configuration in your setup, either with RpgSQL or with
PostgreSQL itself.

> s <- sqldf('create table dat("id" int primary key, "val" int)')
> sqldf("select * from dat")
[1] id  val
<0 rows> (or 0-length row.names)

If you are going to use your own create statements then you might be
better off using RpgSQL directly rather than sqldf.

-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com