ianmcook commented on a change in pull request #10722:
URL: https://github.com/apache/arrow/pull/10722#discussion_r682237507



##########
File path: r/R/dplyr-functions.R
##########
@@ -777,3 +777,34 @@ nse_funcs$case_when <- function(...) {
     )
   )
 }
+
+# Aggregation functions
+# These all return a list of:
+#' @param fun string function name
+#' @param data Expression (these are all currently a single field)
+#' @parma options list of function options, as passed to call_function
+#' For group-by aggregation, `hash_` gets prepended to the function name.
+#' So to see a list of available hash aggregation functions, do
+#' list_compute_functions("^hash_")
+agg_funcs <- list()
+agg_funcs$sum <- function(x, na.rm = FALSE) {
+  list(
+    fun = "sum",
+    data = x,
+    options = list(na.rm = na.rm, na.min_count = 0L)

Review comment:
       Something odd is happening with the NSE so that if I pass `na.rm` as 
shorthand `T` or `F` instead of `TRUE` or `FALSE`, I get an error like this:
   ```
   Error: Can't subset columns that don't exist.
   x Column `T` doesn't exist.
   ```




-- 
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]


Reply via email to