From 5c6c0df19e7b7dbcdb95c301c773fbffa98ccc7d Mon Sep 17 00:00:00 2001 From: Rebecca Butler Date: Thu, 13 Jun 2024 16:27:42 -0700 Subject: [PATCH 1/2] clarify documentation for a nanoplot example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. Correct reference to previously-used `cols_hide()` in one of the nanoplot examples that currently uses `autohide = FALSE` 2. and give context (specify the relevant option) for statement about connecting line not being valuable here. I'm attempting my first nanoplot today so take this suggestion with a giant heaping of salt. But in reading through this example, I thought it could be clearer. Thank you for your incredible documentation — I think it is the 8th wonder of the world!! --- R/modify_columns.R | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/R/modify_columns.R b/R/modify_columns.R index efd4e87abf..d90fe44cb9 100644 --- a/R/modify_columns.R +++ b/R/modify_columns.R @@ -2644,16 +2644,17 @@ cols_add <- function( #' `r man_get_image_tag(file = "man_cols_nanoplot_5.png")` #' }} #' -#' Notice that we hid the columns containing the value streams with -#' [cols_hide()] because, while useful, they don't need to be displayed to -#' anybody viewing a table. We have a lot of data points and a connecting line -#' is not as valuable here. It's more interesting to see the clusters of the -#' differently priced pizzas over the entire day. Specifying a `currency` in -#' [nanoplot_options()] is a nice touch since the *y* values are sale prices in -#' U.S. Dollars (hovering over data points gives correctly formatted values). -#' Finally, having a reference line based on the median gives pretty useful -#' information. Seems like customers preferred getting the `"chicken"`-type -#' pizzas in large size! +#' Notice that the columns containing the value streams are hid due to the +#' default argument `autohide = TRUE` because, while useful, they don't need to +#' be displayed to anybody viewing a table. Since we have a lot of data points +#' and a connecting line is not as valuable here, we also set +#' `show_data_line = FALSE` in [nanoplot_options()]. It's more interesting to +#' see the clusters of the differently priced pizzas over the entire day. +#' Specifying a `currency` in [nanoplot_options()] is a nice touch since the *y* +#' values are sale prices in U.S. Dollars (hovering over data points gives +#' correctly formatted values). Finally, having a reference line based on the +#' median gives pretty useful information. Seems like customers preferred +#' getting the `"chicken"`-type pizzas in large size! #' #' Box plots can be generated, and we just need to use `plot_type = "boxplot"` #' to make that type of nanoplot. Using a small portion of the [`pizzaplace`] From 6412faa9160a49f915e2b0c7821ed6c4d22d4a23 Mon Sep 17 00:00:00 2001 From: Richard Iannone Date: Fri, 14 Jun 2024 14:25:14 -0400 Subject: [PATCH 2/2] Update cols_nanoplot.Rd --- man/cols_nanoplot.Rd | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/man/cols_nanoplot.Rd b/man/cols_nanoplot.Rd index e87cbb2e69..e44ac86aa9 100644 --- a/man/cols_nanoplot.Rd +++ b/man/cols_nanoplot.Rd @@ -574,16 +574,17 @@ streams in each row (having the same number of values) we can now make a This image of a table was generated from the fifth code example in the `cols_nanoplot()` help file. }} -Notice that we hid the columns containing the value streams with -\code{\link[=cols_hide]{cols_hide()}} because, while useful, they don't need to be displayed to -anybody viewing a table. We have a lot of data points and a connecting line -is not as valuable here. It's more interesting to see the clusters of the -differently priced pizzas over the entire day. Specifying a \code{currency} in -\code{\link[=nanoplot_options]{nanoplot_options()}} is a nice touch since the \emph{y} values are sale prices in -U.S. Dollars (hovering over data points gives correctly formatted values). -Finally, having a reference line based on the median gives pretty useful -information. Seems like customers preferred getting the \code{"chicken"}-type -pizzas in large size! +Notice that the columns containing the value streams are hid due to the +default argument \code{autohide = TRUE} because, while useful, they don't need to +be displayed to anybody viewing a table. Since we have a lot of data points +and a connecting line is not as valuable here, we also set +\code{show_data_line = FALSE} in \code{\link[=nanoplot_options]{nanoplot_options()}}. It's more interesting to +see the clusters of the differently priced pizzas over the entire day. +Specifying a \code{currency} in \code{\link[=nanoplot_options]{nanoplot_options()}} is a nice touch since the \emph{y} +values are sale prices in U.S. Dollars (hovering over data points gives +correctly formatted values). Finally, having a reference line based on the +median gives pretty useful information. Seems like customers preferred +getting the \code{"chicken"}-type pizzas in large size! Box plots can be generated, and we just need to use \code{plot_type = "boxplot"} to make that type of nanoplot. Using a small portion of the \code{\link{pizzaplace}}