[R] Suggestions for help weighted.mean

2006-08-11 Thread Yan Wong
Hi, just a quick question: Should weighted.mean be able to cope with the specific case where one weight is Inf? I came across this when trying to implement a simple weighted moving average algorithm for surface smoothing: these algorithms often result in a single infinite weight when

Re: [R] Suggestions for help weighted.mean

2006-08-11 Thread Duncan Murdoch
Yan Wong wrote: Hi, just a quick question: Should weighted.mean be able to cope with the specific case where one weight is Inf? I came across this when trying to implement a simple weighted moving average algorithm for surface smoothing: these algorithms often result in a single

Re: [R] Suggestions for help weighted.mean

2006-08-11 Thread Yan Wong
On 11 Aug 2006, at 12:49, Duncan Murdoch wrote: It makes sense in this case, but in the case where there is more than one infinite weight, the result has to be NaN. ... it would be a lot more complicated if it were to handle this very special case. Yes - I see that it may not be worth