Skip to content
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

sd() should accept na.rm argument #899

Closed
hadley opened this issue May 26, 2022 · 4 comments · Fixed by #902
Closed

sd() should accept na.rm argument #899

hadley opened this issue May 26, 2022 · 4 comments · Fixed by #902

Comments

@hadley
Copy link
Member

hadley commented May 26, 2022

For consistency with the other aggregation functions.

I think we could also consider warning about na.rm once per session for all aggregation functions, rather than once per session for each aggregation function. And that way we could take advantage of warn()'s frequency and frequency_id arguments, rather than hand rolling it.

@hadley
Copy link
Member Author

hadley commented May 26, 2022

Ignore the sd() problem; that seems to be something specific to duckdb, or I'm doing something otherwise dumb. — Ah yes, it's duckdb specific and already fixed in the dev version.

@hadley
Copy link
Member Author

hadley commented May 27, 2022

Maybe sd() is common enough that we should provide a default translation that errors.

@krlmlr
Copy link
Member

krlmlr commented May 30, 2022

This will be closed with the PR.

Should the default translation be SQRT(VAR(...)) ?

@hadley
Copy link
Member Author

hadley commented May 31, 2022

@krlmlr I don't think VAR is any more widely available. We could translate to SUM(AVG(POW(x - AVG(x), 2))) / (COUNT(x) - 1)?

hadley added a commit that referenced this issue May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants