Re: crosstab

From: "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com>
To: Aram Fingal <fingal(at)multifactorial(dot)com>
Cc: Postgres-General General <pgsql-general(at)postgresql(dot)org>
Subject: Re: crosstab
Date: 2012-09-04 20:36:39
Message-ID: 16BCF757-06E1-47C2-8E59-ACD7FEBE6A3B@themactionfaction.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Sep 4, 2012, at 4:30 PM, Aram Fingal wrote:

>
> On Sep 4, 2012, at 4:18 PM, Misa Simic wrote:
>
>> Inside PL/R you can take the same table as it is (unpivoted) as your data.frame and then pivot it inside R using reshape package,,, And then inside PL/R function do whatever you would like to do with data i.e export to whatever... - but you cant return it pivoted as result of Postgres function..
>
> Okay, you just answered my question in reply to Joe Conway (crossed in the mail). So I could just use write.table() from R to save to disk or I might even have the PL/R procedure write a heatmap or PCA plot to disk, again without returning any rows to PostgreSQL.
>
> -Aram

Or you could return the heatmap/plot as BYTEA data or use arrays as necessary.

Cheers,
M

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2012-09-04 20:38:02 Re: "Too far out of the mainstream"
Previous Message Aram Fingal 2012-09-04 20:30:18 Re: crosstab