[R] R and PostgreSQL

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Sun Jun 18 00:26:47 CEST 2000

Paul Condon <pecondon at quiknet.com> writes:

> I am a user of PostgreSQL. I'm interested in generating cross-tabulations of RDBMS
> data. Cross-tabulations are not really possible within the RDBMS paradigm, but
> they are part of the base tutorial stuff of R. I can move the data to R using a
> copy command in Postgres and a the read.table() function in R. But is there a
> better way? Can a system be set up using CORBA or ODBC that lets one access (and
> preprocess) the data from within R? What are the limitations on data set size
> within R?

There's a contributed package called RPgSQL sitting in


I've forgotten the reason why it is in the Devel section, but it does
some of the things you need. 

R is usually limited by the fact that it keeps entire datasets in
memory (see also ?Memory), but the RPgSQL package works around this so
that you need only store selected columns.

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list