Skip to content

Commit

Permalink
vec_c(.name_spec = zap()) from r-lib/vctrs#1091 (#5201)
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed May 7, 2020
1 parent 0f7bb22 commit eea3407
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -41,7 +41,7 @@ Imports:
tibble (>= 2.1.3),
tidyselect (>= 1.0.0),
utils,
vctrs (>= 0.2.99.9010)
vctrs (>= 0.2.99.9011)
Suggests:
bench,
broom,
Expand Down
13 changes: 2 additions & 11 deletions R/across.R
Expand Up @@ -137,19 +137,10 @@ c_across <- function(cols = everything()) {
key <- key_deparse(sys.call())
vars <- c_across_setup({{ cols }}, key = key)

mask <- peek_mask()
mask <- peek_mask("c_across()")

cols <- mask$current_cols(vars)

# TODO: adapt after: https://github.com/r-lib/vctrs/issues/232
tryCatch(
vec_c(!!!unname(cols)),
error = function(e) {
# when combining fails, do it again with the names
# to get a more useful error message
vec_c(!!!cols)
}
)
vec_c(!!!cols, .name_spec = zap())
}

# TODO: The usage of a cache in `across_setup()` and `c_across_setup()` is a stopgap solution, and
Expand Down

0 comments on commit eea3407

Please sign in to comment.