[R-sig-DB] Connecting to Postgresql with R under Debian Woody.

Dirk Eddelbuettel edd @end|ng |rom deb|@n@org
Thu Oct 30 19:54:56 CET 2003


On Thu, Oct 30, 2003 at 04:41:35PM +0100, Antonio wrote:
> 
> Hi.
> 
> It's my first approach with R so don't be mad with me for the simple
> question I'm going to make.
> 
> How do I connect to my Postgresql databases on my Debian Woody.
> These are the r-* packages I've installed:
> 
> ii  r-base         1.5.1-0woody1  GNU R statistical computing language
> and env
> ii  r-base-core    1.8.0.cvs.2003 GNU R core of statistical computing
> language

That looks like a very random mix of a 1.8.1 prerelease (from unstable), 
and the by now old 1.5.1 from stable. This is almost surely a bad idea.

There are recompiled 1.8.0 packages for Debian stable on CRAN. Why not use
those?

> ii  r-base-dev     1.5.1-0woody1  GNU R installation of auxiliary GNU R
> packag
> ii  r-base-html    1.5.1-0woody1  GNU R html docs for statistical
> computing sy
> ii  r-base-latex   1.5.1-0woody1  GNU R LaTeX docs for statistical
> computing s
> ii  r-cran-coda    0.5-15-1       Output analysis and diagnostics for
> MCMC sim
> ii  r-cran-design  2.0.2-1        GNU R regression modeling strategies
> tools b
> ii  r-cran-gtkdevi 0.5.3.1-1      GNU R Gtk device driver package
> ii  r-cran-hmisc   2.0.4-1        GNU R miscellaneous functions by Frank
> Harre
> ii  r-cran-mcmcpac 0.4-3-1        routines for Markov Chain Monte Carlo
> model
> ii  r-doc-pdf      1.5.1-0woody1  GNU R pdf manuals for statistical
> computing
> ii  r-gnome        1.8.0.cvs.2003 GNU R Gnome gui for statistical
> computing sy
> ii  r-noncran-lind 1.0.20031022-1 GNU R libraries contributed by Jim and
> Patri
> ii  r-omegahat-rgt 0.6.10-1       GNU R binding for Gtk
> ii  r-recommended  1.5.1-0woody1  GNU R collection of recommended
> packages
>
> 
> What am I missing?
> Because, when I try library(RPgSQL) it tells me there is no such
> library. Even when I try library() to list all libraries I don't get any
> output that resembles sql or dbi or anything like that......
> Does any one have any suggestions?

Well, you need to install the corresponding CRAN packages.  Dbi and friends
are not available as Debian packages.

To return this to 'how do I connect to Pg under Debian 3.0':

-- install odbc-postgresql and its Depends to give you ODBC on Debian
-- set up DSN entries (not trivial, and I wish it was documented better)
   I thing there is some documentation in r-cran-rodbc
-- use RODBC to connect to Pg via ODBC.

Hth, Dirk

-- 
Those are my principles, and if you don't like them... well, I have others.
                                                -- Groucho Marx




More information about the R-sig-DB mailing list