Displaying 2 results from an estimated 2 matches for "palusga".
2015 Mar 05
3
Performance issue in stats:::weighted.mean.default method
...;- w[i]; x <- x[i] }
- sum((x*w)[w != 0])/sum(w) # --> NaN in empty case
+ sum(x*w)/sum(w) # --> NaN in empty case
}
## see note for ?mean.Date
I hope i'm not missing something - I really don't see the reason to have
this filtration here.
BR
Tadeas 'donarus' Palusga
2015 Mar 05
0
Performance issue in stats:::weighted.mean.default method
On 05/03/2015 14:55, Tade?? Palusga wrote:
> Hi,
> I'm using this mailing list for the first time and I hope this is the
> right one. I don't think that the following is a bug but it can be a
> performance issue.
>
> By my opinion, there is no need to filter by [w != 0] in last sum of
> weighted.me...