Michael Fuhr wrote:
On Mon, Nov 21, 2005 at 11:03:22AM -0500, Berend Tober wrote:
I'm interested in defining a covariance aggregate function. (As a
...aggregates must take a single value, so the above won't
work as written. However, in PostgreSQL 8.0 or later you could
define the aggr
Michael Fuhr wrote:
On Mon, Nov 21, 2005 at 11:03:22AM -0500, Berend Tober wrote:
I'm interested in defining a covariance aggregate function.
I think aggregates must take a single value, so the above won't
work as written. However, in PostgreSQL 8.0 or later you could
define the aggr
Hakan Kocaman wrote:
have you considered using pl/r.
http://www.joeconway.com/plr/
I think R got a covariance-function.
http://www.r-project.org/
That would be, like, the easy way.
Thanks!
Berend
begin:vcard
fn:Berend Tober
n:Tober;Berend
org:Seaworthy Systems, Inc.
adr:;;22 Main Stree
On Mon, Nov 21, 2005 at 11:03:22AM -0500, Berend Tober wrote:
> I'm interested in defining a covariance aggregate function. (As a
> refresher, remember that covariance is a little bit like variance, but
> is between two variables:
>
> cov(X,Y)= - ,
>
> where the angular brackets in this c
Berend Tober <[EMAIL PROTECTED]> writes:
> I'm stuck on not knowing how to define a
> aggregate that takes more that one variable as its argument,
That's because there isn't any way to do that. It's on the TODO list
I believe. In the meantime, you could possibly kluge it up by
defining a compos
Joe Conway wrote:
Berend Tober wrote:
I'm stuck on not knowing how to define a aggregate that takes more
that one variable as its argument
But I guess it _could_ take an array as argument, maybe even
a record (postgresql pseudonym for what's called a structure in C).
You'd use it with the fol
Email: [EMAIL PROTECTED]
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Berend Tober
> Sent: Monday, November 21, 2005 5:03 PM
> To: pgsql-general@postgresql.org
> Subject: [GENERAL] Multi-parameter aggregates.
>
>
>
Berend Tober wrote:
I'm stuck on not knowing how to define a
aggregate that takes more that one variable as its argument
This is currently unsupported.
Joe
---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?
http:/
I'm interested in defining a covariance aggregate function. (As a
refresher, remember that covariance is a little bit like variance, but
is between two variables:
cov(X,Y)= - ,
where the angular brackets in this case denote taking the averag.
Variance is a special case when X and Y are