Skip to content

Conversation

@thisisnic
Copy link
Member

No description provided.

@github-actions
Copy link

list(
fun = "stddev",
data = x,
options = list(ddof = 1)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've manually set ddof here, similarly to how we've manually set na.min_count without exposing this to the end user, but actually, would it make sense to add it as an argument with a default value of 1? I could see ddof (i.e. delta degrees of freedom) maybe being useful in some statistical contexts.

What governs whether we just mimic existing R behaviour vs. expose Arrow's additional functionality?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For scalar functions, you can always call the arrow_ version of the functions if you want arrow behaviors, but that won't work here. Maybe add it to the signature of agg_funcs$sd so it can be passed in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do, thanks

@thisisnic thisisnic marked this pull request as ready for review August 25, 2021 09:46
Copy link
Member

@nealrichardson nealrichardson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, generally LGTM

list(
fun = "stddev",
data = x,
options = list(ddof = 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For scalar functions, you can always call the arrow_ version of the functions if you want arrow behaviors, but that won't work here. Maybe add it to the signature of agg_funcs$sd so it can be passed in?

options = list(na.rm = na.rm, na.min_count = 0L)
)
}
agg_funcs$sd <- function(x, na.rm = FALSE) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like you're passing in na.rm to the options. If that's because of ARROW-13691, leave a comment here about that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point - updated now!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants