How to connect R with PostgreSQL to OSX 10.10.2?

I have the following setup:

  • OSX 10.10.2
  • PostgreSQL 9.4.1
  • R 3.1.3

This answer as of 2011 says the easiest way is to use the package RpgSQL. But this is removed from the CRAN repository. RODBCit is mentioned that there is as a source , but it cannot configure:

configure: error: "ODBC headers sql.h and sqlext.h not found"
ERROR: configuration failed for package ‘RODBC’

I also found another package that could help me - RPostgreSQLbut it will not compile:

In file included from RS-PQescape.c:7:
./RS-PostgreSQL.h:23:14: fatal error: 'libpq-fe.h' file not found
#    include "libpq-fe.h"
             ^
1 error generated.
make: *** [RS-PQescape.o] Error 1
ERROR: compilation failed for package ‘RPostgreSQL’

Is there any other way to connect R and PostgreSQL?

+1
source share
1 answer
0

All Articles