0
8.7 years ago by
Martin Morgan ♦♦ 24k
United States
Martin Morgan ♦♦ 24k wrote:
cancer rdbipgsql process • 466 views
modified 8.7 years ago by Aszodi,Andras30 • written 8.7 years ago by Martin Morgan ♦♦ 24k
0
8.7 years ago by
Aszodi,Andras30 wrote:
On Feb 24, 2011, at 2:50 PM, Martin Morgan wrote: > wanted to mention RPostgreSQL on CRAN as an alternative. Martin ...and this is what I did in the end, based on the suggestions from http://blog.earlh.com/index.php/2009/12/querying-postgres-or- greenplum-from-r-on-a-mac/ . Detailed steps follow for the sake of posterity. Execute them all in a root shell. ${POSTGRES} below refers to the root of your Postgres installation that contains the include/, lib/, bin/, shared/ subdirectories. 1) Make sure the Postgres header files are found: export PG_INCDIR=${POSTGRES}/include/ 2) Make sure GCC can find the pg_config executable: export PG_CONFIG=\${POSTGRES}/bin/pg_config 3) Invoke R. Make sure you invoke the 64-bit version if your Postgres installation is 64-bit (mutatis mutandis for 32-bit installations) >From within R, say install.packages('RPostgreSQL', type='source') select the CRAN mirror, and watch the package being compiled. It is actually quite easy once you know what to do... :-) Many thanks to Dan and Martin for their kind help and suggestions. best regards, Andr?s