diff --git a/man/cols_add.Rd b/man/cols_add.Rd index dcf03ef75a..65556a4bb2 100644 --- a/man/cols_add.Rd +++ b/man/cols_add.Rd @@ -44,18 +44,17 @@ of the column series.} An object of class \code{gt_tbl}. } \description{ -We can add new columns to a table with the \code{cols_add()} function and it works -quite a bit like the \strong{dplyr} \code{mutate()} function. The idea is that you -supply name-value pairs where the name is the new column name and the value -part describes the data that will go into the column. The latter can: -(1) be a vector where the length of the number of rows in the data table, -(2) be a single value (which will be repeated all the way down), or (3) -involve other columns in the table (as they represent vectors of the correct -length). The new columns are added to the end of the column series by default -but can instead be added internally by using either the \code{.before} or \code{.after} -arguments. If entirely empty (i.e., all \code{NA}) columns need to be added, you -can use any of the \code{NA} types (e.g., \code{NA}, \code{NA_character_}, \code{NA_real_}, etc.) -for such columns. +We can add new columns to a table with \code{cols_add()} and it works quite a bit +like \code{dplyr::mutate()} does. The idea is that you supply name-value pairs +where the name is the new column name and the value part describes the data +that will go into the column. The latter can: (1) be a vector where the +length of the number of rows in the data table, (2) be a single value +(which will be repeated all the way down), or (3) involve other columns in +the table (as they represent vectors of the correct length). The new columns +are added to the end of the column series by default but can instead be added +internally by using either the \code{.before} or \code{.after} arguments. If entirely +empty (i.e., all \code{NA}) columns need to be added, you can use any of the \code{NA} +types (e.g., \code{NA}, \code{NA_character_}, \code{NA_real_}, etc.) for such columns. } \section{Targeting the column for insertion with \code{.before} or \code{.after}}{ diff --git a/man/cols_label.Rd b/man/cols_label.Rd index ceb6ca8e57..6e8caebaa7 100644 --- a/man/cols_label.Rd +++ b/man/cols_label.Rd @@ -266,7 +266,7 @@ incorporates unit notation text (within \code{"{{"}/\code{"}}"}). The \code{\link{illness}} dataset has units within the \code{units} column. They're formatted in just the right way for \strong{gt} too. Let's do some text manipulation through \code{dplyr::mutate()} and some pivoting with -\strong{tidyr}'s \code{pivot_longer()} and \code{pivot_wider()} in order to include the +\code{tidyr::pivot_longer()} and \code{tidyr::pivot_wider()} in order to include the units as part of the column names in the reworked table. These column names are in a format where the units are included within \code{"{{"}/\code{"}}"}, so, we can use \code{cols_label()} with the \code{.process_units = TRUE} option to register the diff --git a/man/cols_nanoplot.Rd b/man/cols_nanoplot.Rd index 9ba3636de6..e87cbb2e69 100644 --- a/man/cols_nanoplot.Rd +++ b/man/cols_nanoplot.Rd @@ -534,7 +534,7 @@ time instants: the second of the day that a pizza was sold (this is true pizza analytics). We also have the sell price for a pizza, and that'll serve as the \emph{y} values. The pizzas belong to four different groups (in the \code{type} column) and we'll group by that and create value streams with -\code{paste(..., collapse = ",")} in the \strong{dplyr} summarize call. With two value +\code{paste(..., collapse = ",")} inside the \code{dplyr::summarize()} call. With two value streams in each row (having the same number of values) we can now make a \strong{gt} table with nanoplots. diff --git a/man/fmt_bins.Rd b/man/fmt_bins.Rd index 6c6579d720..7633d49073 100644 --- a/man/fmt_bins.Rd +++ b/man/fmt_bins.Rd @@ -2,16 +2,7 @@ % Please edit documentation in R/format_data.R \name{fmt_bins} \alias{fmt_bins} -\title{Format column data containing bin/interval information -When using \code{cut()} (or other functions that use it in some way) -you get bins that can look like this: \code{"(0,10]"}, \code{"(10,15]"}, \code{"(15,20]"}, -\code{"(20,40]"}. This interval notation expresses the lower and upper limits of -each range. The square or round brackets define whether each of the endpoints -are included in the range (\code{[}/\verb{]} for inclusion, \code{(}/\verb{)} for exclusion). -Should bins of this sort be present in a table, the \code{fmt_bins()} function can -be used to format that syntax to a form that presents better in a display -table. It's possible to format the values of the intervals with the \code{fmt} -argument, and, the separator can be modified with the \code{sep} argument.} +\title{Format column data containing bin/interval information} \usage{ fmt_bins( data, @@ -73,7 +64,6 @@ should contain a formatting call (e.g., An object of class \code{gt_tbl}. } \description{ -Format column data containing bin/interval information When using \code{cut()} (or other functions that use it in some way) you get bins that can look like this: \code{"(0,10]"}, \code{"(10,15]"}, \code{"(15,20]"}, \code{"(20,40]"}. This interval notation expresses the lower and upper limits of diff --git a/man/fmt_icon.Rd b/man/fmt_icon.Rd index ab44ccfd1e..f74b1547ef 100644 --- a/man/fmt_icon.Rd +++ b/man/fmt_icon.Rd @@ -313,11 +313,10 @@ Let's use a portion of the \code{\link{metro}} dataset to create a \strong{gt} t Depending on which train services are offered at the subset of stations, \emph{Font Awesome} icon names will be applied to cells where the different services exist (the specific names are \code{"train-subway"}, \code{"train"}, and -\code{"train-tram"}). With \strong{tidyr}'s \code{unite()} function, those icon names -can be converged into a single column (\code{services}) with the \code{NA} values -removed. Since the names correspond to icons and they are in the correct -format (separated by commas), they can be formatted as \emph{Font Awesome} icons -with \code{fmt_icon()}. +\code{"train-tram"}). With \code{tidyr::unite()}, those icon names can be converged +into a single column (\code{services}) with the \code{NA} values removed. Since the +names correspond to icons and they are in the correct format (separated by +commas), they can be formatted as \emph{Font Awesome} icons with \code{fmt_icon()}. \if{html}{\out{