[R] Reading and writing to S-like databases
jmartinez at uia.net
Fri Sep 28 06:22:58 CEST 2001
Probably not what you wanted to hear, but.... It sounds like you need to
use a relational database management system--assuming that these
'objects' are data frames. If that is the case, then I would migrate to
a RDBMS and establish ODBC (or RpgSQL, RmySQL, etc....) connections with
splus or R.
You can then select particular variables with SQL statements, thereby
avoiding the problem of reading in the entire database.
The downside to this approach is that 'someone' must be capable of
managing the DBMS and to be there to help others. If the DB's are large
and being used by many people, then it might be worth the time and
Sociology Graduate Student
University of California, Riverside
David Brahm wrote:
> I asked this question 2 years ago, and would like to know if the answer has
> In S-Plus, I build databases of many large objects. In any given analysis,
> I only need a few of those objects, but attach'ing the whole database is fine
> since objects are only read as needed. How can I do the same thing in R,
> without reading the entire database?
> One possibility is to treat the database as a package, devoid of code but
> containing many .RData files under /data, then load() each object I'll need.
> Perhaps autoload() can be used to avoid having to anticipate which objects I'll
> Another is to use dput and dget. Again I need to know ahead of time which
> objects I'll want.
> On July 20, 1999, Ross Ihaka [mailto:ihaka at stat.auckland.ac.nz] wrote:
> > We are building the infrastructure for adding external databases which can be
> > attached in the S fashion. One of the class of external data base will be
> > that of S .Data directories.
> I'm not sure where that ended up -- could you clarify, Ross? Thanks!
> -- David Brahm (a215020 at agate.fmr.com)
> 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
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