We definitely need something to handle this. Passing both vectors to skipmissing
is appealing (and could be useful in other situations), but unfortunately it wouldn’t work if we made weights a keyword argument of mean
, which was our plan I think.
Another solution would be to have a custom mean
method for a SkipMissing
first argument which would automatically skip weights corresponding to missing entries (this would only apply if the length of the weights vector is equal to the total number of values, including missing values).