[R] DBM databases for R?
Andrew Perrin
andrew_perrin at unc.edu
Mon Jan 28 17:07:21 CET 2002
In principle, you could write a perl program to run as a daemon, listen on
a socket, and dynamically pass data to R from a DBM file. However, that
seems like a lot of work.
Alternatively, you might consider using a real RDBMS, which R can then
read dynamically. I tend to use PostgreSQL, but others work fine too. That
does let you do what you're talking about: store the data in a relational,
efficient format, and bring it into R when you actually need to analyze.
Andy
----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
On Mon, 28 Jan 2002, Petra Steiner wrote:
> Hello,
>
> > Unfortunately, I don't think that's what the OP is looking for - by DBM
> > databases she probably means Berkeley-style database files, for which (as
>
> that is what I meant indeed. I hoped I could use this mode of storing large
> data for the import of my matrix stuff. Writing out to a file which R could
> read would be of no improvement, for this is what my program is doing at the
> moment by scan.
>
> Thanks for your answers!
>
> Regards,
> Petra
>
> > far as I know) there is no ODBC driver. The only method I can think of to
> > do it would be to read the dbm using perl, then write it out, either to a
> > socket connected to R (the fancy way) or to a file which R could then read
> > in.
> >
> > ap
> >
> > ----------------------------------------------------------------------
> > Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
> > Assistant Professor of Sociology, U of North Carolina, Chapel Hill
> > 269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA
> >
> >
> > On Mon, 28 Jan 2002 Jan_Svatos at eurotel.cz wrote:
> >
> > >
> > > Hello,
> > > in general, there is RODBC package for general ODBC connection.
> > > This works for me well (Windows NT, with name.of.server in ODBC
> sources):
> > >
> > > library(RODBC)
> > > str1 <- "some.sql.select"
> > >
> > > channel <- odbcConnect("name.of.database","","",host="name.of.server") #
> > > connects to database
> > > BTS <- sqlQuery(channel, str1) # runs SQL command
> > > odbcClose(channel)
> > >
> > > I think there are even some packages for specific RDBMS, like Postgres,
> but
> > > I am quite happy with RODBC
> > >
> > > Jan
> > >
> > >
> > >
> > > - - - Original message: - - -
> > > From: owner-r-help at stat.math.ethz.ch
> > > Send: 27/01/2002 3:35:33 PM
> > > To: <r-help at lists.r-project.org> "Petra Steiner"
> <steinep at uni-muenster.de>
> > > Subject: [R] DBM databases for R?
> > >
> > > Hello!
> > >
> > > Can I use DBM databases (as they are used in Perl) for the import of
> > > large datasets in R?
> > >
> > > Thanks in advance for your help,
> > >
> > > Petra Steiner
> > >
> > > -
> > > ---------------------------------------------------
> > > Petra Steiner
> > > Arbeitsbereich Linguistik
> > > Universitaet Muenster
> > > Huefferstrasse 27
> > > 48149 Muenster
> > >
> > > Tel: 0251 / 83 39442
> > > petra at marley.uni-muenster.de
> > > http://santana.uni-muenster.de/~petra/
> > >
> >
> > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
> > > -.-.-
> > > 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
> > >
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
> _._
> > >
> >
>
>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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