[R] JDBC DB access in R

Dirk Eddelbuettel edd at debian.org
Sat Oct 23 20:04:54 CEST 2004


On Sat, Oct 23, 2004 at 08:13:01AM -0400, zubin wrote:
> Thanks for the reply - thru R i have large data sets in oracle, mssql,
> postgres and we have jdbc drivers for all of them - most of these systems
> are on UNIX/LINUX and ODBC is not used - we use JDBC to hit the DB's usually
> in java applications we have.  other than that we are a large SAS shop and i
> am trying to find an alternative to SAS, i think R has a good chance.

Oracle and Postgres have binary connection packages on CRAN, they are likely
to be more efficient than JDBC or ODBC.

For Sybase, we managed to get something working (on Solaris) using the
FreeTDS interface. We actually used FreeTDS and one of the Unix ODBC
packages so that our "client" code would run unchanged from windows and unix
programs -- using the ODBC abstraction.

I can't speak to JDBC.

> For R and SQL - i assume using the wrapper below is the easiest way to hit
> databases via SQL - are there any other ways i am missing?  or is JDBC route
> the easiest when ODBC is not available?

Probably rather the hardest, as Brian told you.

> not sure if R contains some standard database routines that i am not seeing?

Yup, see above.

> also
> 
> does R have some good data manipulations function - if so, could you point
> me in the right direction (similiar to DATA steps in SAS)

Loads of them, and many tricks are posted in various place. You could start
with the writeups provided by Frank Harrell.

Hth, Dirk
 
> -thx!
> 
> 
> -----Original Message-----
> From: Prof Brian Ripley [mailto:ripley at stats.ox.ac.uk]
> Sent: Saturday, October 23, 2004 3:03 AM
> To: zubin
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] JDBC DB access in R
> 
> 
> The J is for Java (I presume, you did't actually say), and R is written in
> C.  So `all' you need to do is to call a Java wrapper from R and call JDBC
> from that.  I believe it has been done via RSJava.
> 
> But if all you want to do is to retrieve a dataframe, isn't this rather
> hard work?
> 
> On Fri, 22 Oct 2004, zubin wrote:
> 
> > Hello, i see packages referencing using ODBC access to databases via R,
> are
> > there any packages that use JDBC to submit SQL to a database and return
> into
> > a data frame?
> 
> --
> Brian D. Ripley,                  ripley at stats.ox.ac.uk
> Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> University of Oxford,             Tel:  +44 1865 272861 (self)
> 1 South Parks Road,                     +44 1865 272866 (PA)
> Oxford OX1 3TG, UK                Fax:  +44 1865 272595
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

-- 
Those are my principles, and if you don't like them... well, I have others.
                                                -- Groucho Marx




More information about the R-help mailing list