Skip to content

Commit

Permalink
Simplify signature of mutate_col()
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Sep 8, 2022
1 parent f43c982 commit ff7bdfb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/mutate.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ mutate_cols <- function(.data, dots, caller_env, error_call = caller_env()) {
withCallingHandlers(
for (i in seq_along(dots)) {
context_poke("column", old_current_column)
new_columns <- mutate_col(i, .data, dots, mask, new_columns)
new_columns <- mutate_col(dots[[i]], .data, mask, new_columns)
},
error = function(e) {
local_error_context(dots = dots, .index = i, mask = mask)
Expand Down Expand Up @@ -284,12 +284,12 @@ mutate_cols <- function(.data, dots, caller_env, error_call = caller_env()) {
new_columns
}

mutate_col <- function(i, data, dots, mask, new_columns) {
mutate_col <- function(dot, data, mask, new_columns) {
rows <- mask$get_rows()

# get results from all the quosures that are expanded from ..i
# then ingest them after
quosures <- expand_across(dots[[i]])
quosures <- expand_across(dot)
quosures_results <- vector(mode = "list", length = length(quosures))

# First pass
Expand Down

0 comments on commit ff7bdfb

Please sign in to comment.