From 098f39e95313cad5a0f30a4bb887a95a9dfd37b7 Mon Sep 17 00:00:00 2001 From: Teun van den Brand Date: Tue, 29 Oct 2024 10:39:34 +0100 Subject: [PATCH] add note --- R/aes.R | 7 +++++++ man/aes.Rd | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/R/aes.R b/R/aes.R index 0829f64daf..045d388d8a 100644 --- a/R/aes.R +++ b/R/aes.R @@ -38,6 +38,13 @@ NULL #' #' [Delayed evaluation][aes_eval] for working with computed variables. #' +#' @note +#' Using `I()` to create objects of class 'AsIs' causes scales to ignore the +#' variable and assumes the wrapped variable is direct input for the grid +#' package. Please be aware that variables are sometimes combined, like in +#' some stats or position adjustments, that may yield unexpected results with +#' 'AsIs' variables. +#' #' @family aesthetics documentation #' @return A list with class `uneval`. Components of the list are either #' quosures or constants. diff --git a/man/aes.Rd b/man/aes.Rd index c49fbefada..ed77c5d39e 100644 --- a/man/aes.Rd +++ b/man/aes.Rd @@ -30,6 +30,13 @@ This function also standardises aesthetic names by converting \code{color} to \c (also in substrings, e.g., \code{point_color} to \code{point_colour}) and translating old style R names to ggplot names (e.g., \code{pch} to \code{shape} and \code{cex} to \code{size}). } +\note{ +Using \code{I()} to create objects of class 'AsIs' causes scales to ignore the +variable and assumes the wrapped variable is direct input for the grid +package. Please be aware that variables are sometimes combined, like in +some stats or position adjustments, that may yield unexpected results with +'AsIs' variables. +} \section{Quasiquotation}{