incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirkjan Ochtman <dirk...@ochtman.nl>
Subject Re: Is their a straightforward way of calculating mean value?
Date Thu, 14 Oct 2010 07:48:07 GMT
On Thu, Oct 14, 2010 at 09:29, sleepy <wanpeebaw@gmail.com> wrote:
> I'm doing some statistics on my data and wondering is there
> an straightforward way of calculating the mean value through reduce
> function.
> Maybe a build-in reduce function or something...

I don't think there's a built-in average function, but the obvious
solution here is to return an array with two elements: the sum of all
values you'd like to average, and the number of these values.

Cheers,

Dirkjan

Mime
View raw message