Aggregates

how to calculate std dev() and median in clover and i used aggregate componenet to calculate sum(),max(),min() and i got the result and stddev() i am not getting the result and how to use stddev()? and there is fuction to calculate median.

IS THERE ANY EXAMPLES IN CLOVER BY USING STDDEV AND MEDIAN

please help me

srinu

Hi,
which version of clover are you using. In the 2.2 version, the aggregate component was updated (the aggregate documentation on the wiki is out of date, that will be fixed). The stddev() function should work, e.g.:

$ouput_field:=stddev($input_field)

Please note that standard deviation cannot be computed from one value. So in case that some aggregation group (defined by the aggregation key) has only 1 member, the standard deviation of any field of that group is null.

could you please post the clover graph you are trying to run? Or at least post the aggregation mapping of the aggregate component.

The aggregate component does not have a median() function, but that seems to be a great idea!

Thanks!
Jaro