Re: R and postgres

From: Adrian Klaver <aklaver(at)comcast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Reece Hart <reece(at)harts(dot)net>
Subject: Re: R and postgres
Date: 2006-11-07 04:29:10
Message-ID: 200611062029.10432.aklaver@comcast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Monday 06 November 2006 07:38 pm, Reece Hart wrote:
> On Mon, 2006-11-06 at 19:13 -0800, Adrian Klaver wrote:
> > You might want to take a look at PL/R a procedural language for R in
> > Postgres.
> > http://www.joeconway.com/plr/
>
> PL/R is indeed neat, but I want to go the other way: within R, fetch
> data from postgres and manipulate it (plot, histogram, etc). I
> appreciate that I could expose this through postgres, but that's a
> little awkward for prototyping and I'm not keen to add load to my
> postgres box.
>
> -Reece
Sorry, I did not read the message closely enough. A quick perusal of the R
docs helped me understand the issue a little better. The only solution I can
see at this point is to have an intermediate step. There are two ways I can
see to do this. The first is to use the copy command to create a csv file.
The read.table() function would then be used in R to import the data. The
second is use the program pg2xbase
http://www.klaban.torun.pl/prog/pg2xbase/
to create a DBF file and use read.dbf() to input the file.
--
Adrian Klaver
aklaver(at)comcast(dot)net

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ben 2006-11-07 05:00:32 Re: R and postgres
Previous Message Reece Hart 2006-11-07 03:58:04 Re: database name aliases?