nealrichardson commented on a change in pull request #11156:
URL: https://github.com/apache/arrow/pull/11156#discussion_r708622685
##########
File path: r/R/util.R
##########
@@ -58,10 +58,22 @@ r_symbolic_constants <- c(
"NA_integer_", "NA_real_", "NA_complex_", "NA_character_"
)
+is_function <- function(expr, name) {
+ if (!is.call(expr)) {
+ return(FALSE)
+ } else {
+ if (deparse(expr[[1]]) == name) {
+ return(TRUE)
+ }
+ out <- lapply(expr, is_function, name)
+ }
+ any(vapply(out, isTRUE, TRUE))
+}
+
all_funs <- function(expr) {
# Don't use setdiff so that we preserve duplicates
Review comment:
I changed it because it seemed overly complicated for something that
base R should do for us, and no test failed when I did.
--
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]