From 1a6a993c9e2b46bb62b2d01ce9070b6647062e19 Mon Sep 17 00:00:00 2001 From: Lionel Henry Date: Thu, 24 Oct 2024 14:01:15 +0200 Subject: [PATCH] Slightly clearer description in `new_data_mask()` --- R/eval-tidy.R | 19 ++++++++++--------- man/as_data_mask.Rd | 19 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/R/eval-tidy.R b/R/eval-tidy.R index 91e0386916..721580f823 100644 --- a/R/eval-tidy.R +++ b/R/eval-tidy.R @@ -220,15 +220,16 @@ print.rlang_fake_data_pronoun <- function(...) cat_line("") #' @description #' #' A [data mask][topic-data-mask] is an environment (or possibly -#' multiple environments forming an ancestry) containing user-supplied -#' objects. Objects in the mask have precedence over objects in the -#' environment (i.e. they mask those objects). Many R functions -#' evaluate quoted expressions in a data mask so these expressions can -#' refer to objects within the user data. -#' -#' These functions let you construct a tidy eval data mask manually. -#' They are meant for developers of tidy eval interfaces rather than -#' for end users. +#' multiple environments forming an ancestry) that inherits from the +#' current evaluation environment and contains additional named objects. +#' These extra variables are added to the evaluation context and, if there +#' are any name clashes, have precedence over the latter (i.e., they mask +#' those objects). Data masks are the technique by which columns of a data +#' frame are made available in special evaluation contexts such as +#' `dplyr::summarise()`. +#' +#' These functions build a tidy eval data mask manually. They are meant +#' for developers of tidy eval interfaces rather than for end users. #' #' #' @section Why build a data mask?: diff --git a/man/as_data_mask.Rd b/man/as_data_mask.Rd index 1a4ff78f5c..fc0b12722c 100644 --- a/man/as_data_mask.Rd +++ b/man/as_data_mask.Rd @@ -36,15 +36,16 @@ A data mask that you can supply to \code{\link[=eval_tidy]{eval_tidy()}}. } \description{ A \link[=topic-data-mask]{data mask} is an environment (or possibly -multiple environments forming an ancestry) containing user-supplied -objects. Objects in the mask have precedence over objects in the -environment (i.e. they mask those objects). Many R functions -evaluate quoted expressions in a data mask so these expressions can -refer to objects within the user data. - -These functions let you construct a tidy eval data mask manually. -They are meant for developers of tidy eval interfaces rather than -for end users. +multiple environments forming an ancestry) that inherits from the +current evaluation environment and contains additional named objects. +These extra variables are added to the evaluation context and, if there +are any name clashes, have precedence over the latter (i.e., they mask +those objects). Data masks are the technique by which columns of a data +frame are made available in special evaluation contexts such as +\code{dplyr::summarise()}. + +These functions build a tidy eval data mask manually. They are meant +for developers of tidy eval interfaces rather than for end users. } \section{Why build a data mask?}{