Skip to content

[Newbie] Is there any support for work with grouped frequencies?

1 message · Yves Brostaux

#
For the mean, there is a function called weighted.mean() and you can use it 
as a start for custom functions.

An alternative is to expand your grouped data before applying your 
function, e.a.

 > x <- rep(wtc$MIDPOINT, wtc$FREQ)
 > c(Mean=mean(x), Var=var(x))

but it isn't appropriate for some parameters (it doesn't give interpolated 
median, etc)
At 04:01 14/11/02, you wrote: