-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add convenience skip-missing methods for Base aggregation functions #146
Comments
I'm not too much of a fan of these ad-hoc solutions, as the list of functions to support is quite arbitrary. If we go that way we should probably provide functions for all Statistics and StatsBase functions at least, and be prepared to get request to add more functions. Also the problem is more general than these functions. The annoyance when working with missing values is also to be able to propagate them when transforming values or vectors. |
Isn't that already handled by
I would probably specify in the documentation that only skip-missing versions of Base/stdlib functions are provided (and maybe StatsBase??). Adding |
Yes, but skipping missing values is already handled by |
My thinking is that it is OK if someone makes a package with Such a package would be small and simple and that is why I think it would be a reasonable solution (as opposed to discussing the creation of a complex package that would take many days of work, which indeed requires significant coordination effort of the community upfront). |
I think #122 will handle this case... we just need much simpler names. like |
Having a generic solution like @pdeffebach proposes would be nice but I think users would still appreciate simple "direct" functions like I think abstract operations like |
I have expanded on my thoughts in https://discourse.julialang.org/t/why-are-missing-values-not-ignored-by-default/106756/234 |
xref: https://discourse.julialang.org/t/why-are-missing-values-not-ignored-by-default/106756
There are some users who dislike
mean(skipmissing(x))
because they view it as too verbose or too many keystrokes. Aggregation functions that skip missing values are very commonly needed, so I think it would be worth adding convenience skip-missing methods for Base aggregation functions to Missings.jl, e.g.smean
ssum
svar
scor
The
svar
andscor
functions could have a keyword argument to control exactly how missing values are skipped, similar tocor
in R.The text was updated successfully, but these errors were encountered: