DavisVaughan commented on issue #34366:
URL: https://github.com/apache/arrow/issues/34366#issuecomment-1446652168
Since you already use both rlang and glue it looks like you can just add
these two helpers to arrow itself (i.e. don't try and grab anything from
dplyr's internals)
```r
check_n_name <- function(name,
vars,
call = caller_env()) {
if (is.null(name)) {
name <- n_name(vars)
if (name != "n") {
inform(c(
glue("Storing counts in `{name}`, as `n` already present in input"),
i = "Use `name = \"new_name\"` to pick a new name."
))
}
} else {
if (!is_string(name)) {
abort("`name` must be a string or `NULL`.", call = call)
}
}
name
}
n_name <- function(x) {
name <- "n"
while (name %in% x) {
name <- paste0("n", name)
}
name
}
```
that's all I meant by inlining
--
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]