[R] R and database access

Adam Witney awitney at sghms.ac.uk
Fri Sep 13 15:30:29 CEST 2002


Hi David,

Thanks for your reply. I have just managed to get the RODBC interface to
connect. Here is the problem with Rdbi.PgSQL

> library(Rdbi.PgSQL)
Loading required package: Rdbi
Error in dyn.load(x, as.logical(local), as.logical(now)) :
        unable to load shared library "/Users/adam/Projects/R
stuff/rlibs/Rdbi.PgSQL/libs/Rdbi.PgSQL.so":
  dlcompat: dyld: /sw/lib/R/bin/R.bin Undefined symbols:
_ERR_get_error
_ERR_reason_error_string
_SSL_CTX_new
_SSL_connect
_SSL_free
_SSL_library_init
_SSL_load_error_strings
_SSL_new
_SSL_read
_SSL_set_fd
_SSL_write
_SSLv23_method
Error in library(Rdbi.PgSQL) : .First.lib failed

Any ideas?

Thanks

adam


> Adam Witney wrote:
>> Hi,
>> 
>> I am relatively new at R, but I would like to be able to directly access my
>> MySQL and PostgreSQL databases from R. I have been looking around CRAN and
>> searching through Google, however I am not sure what are the best options. I
>> have seen
>> 
>> DBI         - not sure how this works
>> Rdbi        - not sure how this works
>> Rdbi.PgSQL  - can install, but fails on trying to load
>> RODBC       - cannot connect (I cannot find any troubleshooting guides)
>> RPgSQL      - can install, but fails on trying to load
>> RMySQL      - installation fails
> 
> Historically, each database package has had its own set of
> function (API) for interfacing with the database.  This means
> that the function names and methods used to connect through ODBC are
> completely different than, say, to  mSQL, Oracle or PostgreSQL.
> The problem was recognized and a special interest group on databases
> (R-SIG-DB) was formed to come up with a common database interface
> (DBI) similar in spirit to Java's JDBC, Perl's DBI/DBI, ODBC,
> Python's DB, etc.  The database interface package "DBI" reflects
> the current proposal, and it is based on Tim Keitt's Rdbi plus
> input from others.
> 
> As of today, no package in CRAN is yet DBI-compliant, but this is
> simply due to time constraints on package developers and maintainers
> who have to migrate their packages from existing individual APIs
> to the DBI.  
> 
> With the release of R version 1.6.0, there will be DBI-compliant
> packages for Oracle, MySQL, and SQLite (for beta versions go to
> ftp://ftp.cran.r-project.org/pub/R/src/contrib/1.6.0/Other
> and there are plans to port others, time permitting.
> 
>> 
>> (System = Mac OSX 10.2)
>> 
>> Which is considered the most up to date way of achieving this connection?
>> 
> 
> Hmmm, some of these packages have been used quite extensively (PgSQL
> in particular).  Also I see you're using Jaguar (Mac OS X, 10.2),
> so it's possible that some of the problems you've experienced are
> due to the changes in the operating system, C libraries, etc.,
> but hopefully these will be identified and addressed soon.
> 
>> Thanks for any help
>> 
>> adam
>> 
>> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
>> .-
>> 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
>> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>> ._


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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