Skip to content

Commit

Permalink
Simplify cur_data() with $current_non_group_vars()
Browse files Browse the repository at this point in the history
  • Loading branch information
DavisVaughan committed Mar 3, 2020
1 parent 5b179a0 commit 7c47df9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions R/context.R
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,8 @@ n <- function() {
#' @export
cur_data <- function() {
mask <- peek_mask("cur_data()")
data <- mask$full_data()

current_vars <- mask$current_vars()
group_vars <- group_vars(data)

mask$pick(setdiff(current_vars, group_vars))
vars <- mask$current_non_group_vars()
mask$pick(vars)
}

#' @rdname context
Expand Down

0 comments on commit 7c47df9

Please sign in to comment.