Skip to content

connecting R and PostgreSQL

4 messages · Aya74656 at gmx.de, Gabor Grothendieck, Steven Kennedy +1 more

#
Dear R-helpers,

I'm an absolute beginner using both R and PostgreSQL, but now I have to work with both programs. I need to connect R and my Postgres-database, but every attempt so far has failed (I tried using the RpgSQL package as well as RdbiPgSQL, the first, following this manual (http://code.google.com/p/rpostgresql/) didn't find any drivers for the database (step no. 1) whereas the second doesn't work with R version 2.13). 

Could someone please be so kind to either provide a step-by-step instruction on how to make this connection work or direct me to a manual?

Thanks in advance.

Yours sincerly,

Marie
--
#
On Tue, Jun 28, 2011 at 8:15 AM, <Aya74656 at gmx.de> wrote:
For RpgSQL there is installation info if you click on the Installation
link here:

http://cran.r-project.org/web/packages/RpgSQL/index.html

and the same info is in the INSTALL file in the package.
#
I use RODBC and have got it to work fine on Windows, Linux and Mac.

There's some basic info here, and plenty of blog posts out there with
step by step instructions for the different OS's.

http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/RODBC/html/00Index.html



On Tue, Jun 28, 2011 at 11:53 PM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
#
Marie,

you did not say if you work on Windows or Unix. The manual from google
belongs to the R package RpostgreSQL. This package makes use the native
PostgreSQL driver. As I read the documentation, the package's DBI
interface must be somehow binary compatible with the Postgres version
installed. It installs and works seamlessly here on Linux, and also
works with Windows Vista, but I remember that I had to shuffle some dlls
from the postgresql directory. So if you provide some more information,
maybe I'll remember what I did to get it running.

Best regards

Hugo

Am 28.06.2011 14:15, schrieb Aya74656 at gmx.de: