R Language Logo S Language Logo


R/S-Database Interface

The R/S Database Interface, RS-DBI, is a set of classes and methods for interfacing R, S, and S-Plus to relational database systems (RDBMS). For details see A Common Interface to Relational Databases from R and S (or as an Adobe's PDF file).

Please send us your suggestions and comments on the RS-DBI to either the The R Databases Special Interest Group or The Omega Project for Statistical Computing

Available Implementations

We have RS-DBI interfaces to MySQL, SQLite, and Oracle. You may download the code from here (for a DBI implementation to PostgreSQL see RPgSQL).

Other Database Connections from R

The following R packages provide connectivity to databases. Each package defines its own set of classes and methods (except RPgSQL which has its own implementation of the RS-DBI) to connect R and the corresponding database(s).

Other Database Connections from S-Plus

Depending on the platform it's running, S-Plus provides access to some DBMS through the importData/exportData functions. Under Microsoft Windows you may import/export data through ODBC; under Solaris (and only Solaris) you may import data from Informix, Oracle, and Sybase. See also the function executeSQL.


David A James
Bell Labs, Lucent Technologies
600 Mountain Ave
Room 2C-253
Murray Hill, NJ 07974-0636
(908) 582-3082 (voice)
(908) 582-3340 (fax)