nealrichardson commented on a change in pull request #10996:
URL: https://github.com/apache/arrow/pull/10996#discussion_r695746041
##########
File path: r/R/dplyr-functions.R
##########
@@ -808,3 +808,25 @@ agg_funcs$all <- function(x, na.rm = FALSE) {
options = list(na.rm = na.rm, na.min_count = 0L)
)
}
+
+agg_funcs$mean <- function(x, na.rm = FALSE) {
+ list(
+ fun = "mean",
+ data = x,
+ options = list(na.rm = na.rm, na.min_count = 0L)
+ )
+}
+agg_funcs$sd <- function(x, na.rm = FALSE) {
+ list(
+ fun = "stddev",
+ data = x,
+ options = list(ddof = 1)
Review comment:
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?
##########
File path: r/R/dplyr-functions.R
##########
@@ -808,3 +808,25 @@ agg_funcs$all <- function(x, na.rm = FALSE) {
options = list(na.rm = na.rm, na.min_count = 0L)
)
}
+
+agg_funcs$mean <- function(x, na.rm = FALSE) {
+ list(
+ fun = "mean",
+ data = x,
+ options = list(na.rm = na.rm, na.min_count = 0L)
+ )
+}
+agg_funcs$sd <- function(x, na.rm = FALSE) {
Review comment:
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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]