[STATSGRASS] Re: Connecting to databases on Windows using R
Craig Aumann
caumann at ualberta.ca
Thu Mar 17 13:33:02 EST 2005
See Teague's question below. As a linux person, I don't know the answer
to this so am forward this message to the list.
Having looked also at http://www.bioconductor.org/ - which links off of
the main R web page, I see a Windows version of Rdbi (click "What is
Bioconductor" and scroll down till you find the heading: "Database
Interaction"). I'm seeing a RDBI for Windows, but no windows version of
RdbiPgsql which is a problem!
Have you tried sending a message to the R-Help list about this - how do
windows users access PGSQL databases from R? (R website -> mailing
lists.)
On the CRAN site, just searching databases, I saw the following:
DBI, RMySQL, RODBC, ROracle. Not sure if windows versions exist for any
of these.
Also have a look at the links in
http://cran.r-project.org/doc/manuals/R-data.html .
Afraid that's all I know about attaching to Databases on Windows - which
ain't much I'm afraid.
Cheers!
Craig
On Thu, 2005-03-17 at 10:40, Teague O'Mara wrote:
> Hi Craig. I came back across this email from awhile ago. I'm attempting to
> look at cluster of points in GRASS and have been using the script that Michael
> Barton wrote, but I'd like to look at a few other things and it seems that using
> R and my GRASS data will be much easier. I have been using R for basic
> statistics, but am far from being fluent with it. If you have a moment, can you
> help me out with some R issues? I'm using an XP machine with R 2.0.1.
>
> I'm having a problem downloading and installing Rdbi and RdbiPgSQL. I can't
> find these two sets, or any SQL interface that will download from CRAN. I was
> able to download these directly from sourcforge (tar.gz format), but I'm not
> sure what to do with them now. Is it an issue with this version of R?
>
> Thanks for any help you can offer.
>
> Cheers--
> Teague
>
>
>
> Teague O'Mara
> Department of Anthropology
> Arizona State University
> Box 872402
> Tempe, AZ 85287-2402
> 480.965.6213
>
>
> Quoting Craig Aumann <caumann at ualberta.ca>:
>
> > In glancing at your script, I wondered why you didn't just import the
> > stuff into a statistical package like R and then use all the
> > clustering
> > routines it has. See www.r-project.org
> >
> >
> >
> >
> > ## Key commands in R are:
> >
> > ## Load the packages to access the database, in particular the PgSQL
> > ##
> > database
> > require(Rdbi)
> > require(RdbiPgSQL)
> >
> > ## Load some clustering routines
> >
> > require(cluster)
> > require(mclust)
> >
> >
> > ### Connect to the database and read in a points data set "jogis"
> > ## and read in the dataset "wells_att".
> >
> >
> > conn <- dbConnect(PgSQL(), dbname="jogis", user="caumann")
> > wells <- dbReadTable(conn, "wells_att")
> > dbDisconnect(conn)
> >
> > ## Now you can apply any clustering or kernel smoothing technique you
> > want to the dataset.
> >
> > If this is of any help, let me know and I can provide more details.
> > Cheers!
> > Craig
> >
> >
>
>
>
More information about the grass-stats
mailing list