Skip to content

Commit

Permalink
Pass lexical environment to as_function()
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- authored and nacnudus committed Jun 29, 2021
1 parent 0c7895c commit 7b6d7a9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion R/enhead.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,11 @@ side_join <- function(data_cells, header_cells, corner, drop = TRUE) {
header_cells,
!!pos := corner_pos(!!pos, corner)
)
rlang::as_function(corner)(data_cells, header_cells, drop = drop)
match_function(corner)(data_cells, header_cells, drop = drop)
}

match_function <- function(x, env = parent.frame()) {
rlang::as_function(x, env = env)
}

corner_pos <- function(cells, corner) {
Expand Down

0 comments on commit 7b6d7a9

Please sign in to comment.