3

I seem to be unable to compile RPostgreSQL for Windows x64, and after extensive searching, I've not been able to find a precompiled binary. To get on with my work, I've installed a 32 bit version of Postgre and have been using 32 bit R for all database ops.

I need to do much of my work in 64 bit R, so switching back and forth has become a bit painful, especially since this requires a save() and load() operation each time I need to run a query.

I'm wondering whether it is possible to call one R installation directly from another? For example, could I simply pass queries to my 32 bit R installation and retrieve the result? I think there are other times when the ability to call another R installation would be useful as well.

All I've come up with is using a system() call, either directly to pgsql or to 32-bit R, but this doesn't allow for very efficient transfer of data.

I'd very sincerely appreciate any advice or assistance!

P.S. I'd rather ask how to compile RPostgreSQL for x64, but as I understand the rules here, such a question would be inappropriate since it's not a general question (e.g. I'd need step-by-step instructions since I don't have the requisite skills).

Jason B
  • 893
  • 7
  • 13
  • Speaking as one of several people contributing to RPostgreSQL, we could do with a knowledgeable person dealing with Windows, 32 and 64. But yes, you may have to build PostgreSQL first. – Dirk Eddelbuettel Apr 13 '11 at 14:52
  • Thanks Dirk, for RPostgreSQL and for the many other contributions you've made - they are deeply appreciated. As for compiling, the process can be very mysterious to those of us who live in interpreted languages! – Jason B Apr 13 '11 at 16:00
  • see comment here: http://cran.r-project.org/bin/windows/contrib/r-release/ReadMe so install.packages('RPostgreSQL', type='source') might just work if you are set up to build R packages from source and your DB is available – mdsumner Apr 13 '11 at 22:27
  • Thanks mdsummer. I was finally able to install from source successfully by following those directions. Now I can load RPostgreSQL and get a db driver with dbDriver(), but R crashes whenever I try to create a connection with dbConnect(). Since it seems to compile correctly, I'm pretty much at a loss. – Jason B Apr 14 '11 at 02:06

1 Answers1