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{
}}\preformatted{metro |> dplyr::select(name, lines, connect_rer, connect_tramway, location) |> diff --git a/man/info_icons.Rd b/man/info_icons.Rd index 3a6c769e60..88fabee9b4 100644 --- a/man/info_icons.Rd +++ b/man/info_icons.Rd @@ -17,7 +17,8 @@ of these icons as replacement text (so long as you use the \code{fa()} function from the \strong{fontawesome} package). Because there is a very large number of icons available to use in \emph{Font Awesome}, \code{info_icons()} can be used to provide us with a table that lists all the icons along with their short and -full names (either can be used with \code{\link[=fmt_icon]{fmt_icon()}}). +full names (either can be used with \code{\link[=fmt_icon]{fmt_icon()}}). It also contains +acceptable codes for \code{\link[=fmt_country]{fmt_country()}} } \section{Examples}{ diff --git a/man/location-helper.Rd b/man/location-helper.Rd index 5b014599f7..9beaf46988 100644 --- a/man/location-helper.Rd +++ b/man/location-helper.Rd @@ -74,3 +74,4 @@ Other location helper functions: \code{\link{cells_title}()} } \concept{location helper functions} +\keyword{internal} diff --git a/man/rows_add.Rd b/man/rows_add.Rd index 2753207988..817e5a9703 100644 --- a/man/rows_add.Rd +++ b/man/rows_add.Rd @@ -203,7 +203,7 @@ name of the row label. Another application is starting from nothing (really just the definition of columns) and building up a table using several invocations of \code{rows_add()}. This might be useful in interactive or programmatic applications. Here's an -example where two columns are defined with \strong{dplyr}'s \code{tibble()} function +example where two columns are defined with \code{dplyr::tibble()} (and no rows are present initially); with two calls of \code{rows_add()}, two separate rows are added. diff --git a/man/tab_spanner_delim.Rd b/man/tab_spanner_delim.Rd index 18c592d0d5..4eb185e8e9 100644 --- a/man/tab_spanner_delim.Rd +++ b/man/tab_spanner_delim.Rd @@ -235,10 +235,9 @@ two levels of spanners. We can further touch up the labels after that with }} With a summarized, filtered, and pivoted version of the \code{\link{pizzaplace}} -dataset, we can create another \strong{gt} table and then use the -\code{tab_spanner_delim()} function with the same delimiter/separator that was -used in the \strong{tidyr} \code{pivot_wider()} call. We can also process the generated -column labels with \code{\link[=cols_label_with]{cols_label_with()}}. +dataset, we can create another \strong{gt} table and then use \code{tab_spanner_delim()} +with the delimiter/separator also used in \code{tidyr::pivot_wider()}. We can also +process the generated column labels with \code{\link[=cols_label_with]{cols_label_with()}}. \if{html}{\out{
}}\preformatted{pizzaplace |> dplyr::select(name, date, type, price) |>