From b680d285244b55e46b715cea379d65c6580d5970 Mon Sep 17 00:00:00 2001 From: olivroy Date: Sun, 12 May 2024 08:37:11 -0400 Subject: [PATCH 1/6] Move `locations` helper to own topic (example) --- DESCRIPTION | 1 + R/helpers.R | 40 ------------------- R/topics.R | 56 +++++++++++++++++++++++++++ man/cells_column_spanners.Rd | 43 --------------------- man/location-helper.Rd | 74 ++++++++++++++++++++++++++++++++++++ 5 files changed, 131 insertions(+), 83 deletions(-) create mode 100644 R/topics.R create mode 100644 man/location-helper.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 3b8ad3e9b8..d1f4a9182a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -136,6 +136,7 @@ Collate: 'tab_remove.R' 'tab_style_body.R' 'text_transform.R' + 'topics.R' 'utils.R' 'utils_color_contrast.R' 'utils_environments.R' diff --git a/R/helpers.R b/R/helpers.R index 73f6e5628c..f0323162a1 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -1326,46 +1326,6 @@ cells_stubhead <- function() { #' @return A list object with the classes `cells_column_spanners` and #' `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Use the [`exibble`] dataset to create a **gt** table. We'll add a spanner diff --git a/R/topics.R b/R/topics.R new file mode 100644 index 0000000000..fd78d5eff3 --- /dev/null +++ b/R/topics.R @@ -0,0 +1,56 @@ +#' Helper to target cells at `locations` +#' +#' @name location-helper +#' @description +#' This listing with locations corresponding roughly from top to +#' bottom of a table: +#' +#' - [cells_title()]: targets the table title or the table subtitle depending on +#' the value given to the `groups` argument (`"title"` or `"subtitle"`). +#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only +#' available when there is a stub; a label in that location can be created by +#' using the [tab_stubhead()] function. +#' - [cells_column_spanners()]: targets the spanner column labels with the +#' `spanners` argument; spanner column labels appear above the column labels.* +#' - [cells_column_labels()]: targets the column labels with its `columns` +#' argument.* +#' - [cells_row_groups()]: targets the row group labels in any available row +#' groups using the `groups` argument.* +#' - [cells_stub()]: targets row labels in the table stub using the `rows` +#' argument.* +#' - [cells_body()]: targets data cells in the table body using intersections of +#' `columns` and `rows`.* +#' - [cells_summary()]: targets summary cells in the table body using the +#' `groups` argument and intersections of `columns` and `rows`. +#' - [cells_grand_summary()]: targets cells of the table's grand summary using +#' intersections of `columns` and `rows` +#' - [cells_stub_summary()]: targets summary row labels in the table stub using +#' the `groups` and `rows` arguments. +#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table +#' stub using the `rows` argument. +#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be +#' used with [tab_footnote()]). +#' - [cells_source_notes()]: targets all source notes in the table footer +#' (cannot be used with [tab_footnote()]). +#' +#' `*` are the only functions usable by the `text_*()` functions. +#' +#' # Note +#' +#' When using any of the location helper functions with an appropriate function +#' that has a `locations` argument (e.g., [tab_style()]), multiple locations +#' can be targeted by enclosing several `cells_*()` helper functions in a +#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). +#' +#' @family location helper functions +#' +#' @seealso +#' Functions that use these helper function with `locations`: +#' +#' * [tab_footnote()] +#' * [tab_style()] +#' * [text_transform()] +#' * [text_replace()] +#' * [text_case_when()] +#' * [text_case_match()] +NULL diff --git a/man/cells_column_spanners.Rd b/man/cells_column_spanners.Rd index 33ad4100ac..d3d6eaa47a 100644 --- a/man/cells_column_spanners.Rd +++ b/man/cells_column_spanners.Rd @@ -28,49 +28,6 @@ is expressly used in each of those functions' \code{locations} argument. The 'column_spanners' location is generated by one or more uses of the \code{\link[=tab_spanner]{tab_spanner()}} function or the \code{\link[=tab_spanner_delim]{tab_spanner_delim()}} function. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/location-helper.Rd b/man/location-helper.Rd new file mode 100644 index 0000000000..b567741f62 --- /dev/null +++ b/man/location-helper.Rd @@ -0,0 +1,74 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/topics.R +\name{location-helper} +\alias{location-helper} +\title{Helper to target cells at \code{locations}} +\description{ +This listing with locations corresponding roughly from top to +bottom of a table: +\itemize{ +\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on +the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). +\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only +available when there is a stub; a label in that location can be created by +using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. +\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the +\code{spanners} argument; spanner column labels appear above the column labels.* +\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} +argument.* +\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row +groups using the \code{groups} argument.* +\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} +argument.* +\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of +\code{columns} and \code{rows}.* +\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the +\code{groups} argument and intersections of \code{columns} and \code{rows}. +\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using +intersections of \code{columns} and \code{rows} +\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using +the \code{groups} and \code{rows} arguments. +\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table +stub using the \code{rows} argument. +\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be +used with \code{\link[=tab_footnote]{tab_footnote()}}). +\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer +(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). +} + +\code{*} are the only functions usable by the \verb{text_*()} functions. +} +\section{Note}{ +When using any of the location helper functions with an appropriate function +that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations +can be targeted by enclosing several \verb{cells_*()} helper functions in a +\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). +} + +\seealso{ +Functions that use these helper function with \code{locations}: +\itemize{ +\item \code{\link[=tab_footnote]{tab_footnote()}} +\item \code{\link[=tab_style]{tab_style()}} +\item \code{\link[=text_transform]{text_transform()}} +\item \code{\link[=text_replace]{text_replace()}} +\item \code{\link[=text_case_when]{text_case_when()}} +\item \code{\link[=text_case_match]{text_case_match()}} +} + +Other location helper functions: +\code{\link{cells_body}()}, +\code{\link{cells_column_labels}()}, +\code{\link{cells_column_spanners}()}, +\code{\link{cells_footnotes}()}, +\code{\link{cells_grand_summary}()}, +\code{\link{cells_row_groups}()}, +\code{\link{cells_source_notes}()}, +\code{\link{cells_stub}()}, +\code{\link{cells_stub_grand_summary}()}, +\code{\link{cells_stub_summary}()}, +\code{\link{cells_stubhead}()}, +\code{\link{cells_summary}()}, +\code{\link{cells_title}()} +} +\concept{location helper functions} From ffaa4d24fe30ea801b45b11b2b03ebb2dfb6c6e3 Mon Sep 17 00:00:00 2001 From: olivroy Date: Sun, 12 May 2024 08:43:55 -0400 Subject: [PATCH 2/6] Create location helper functions (separate from helper functions) --- R/helpers.R | 26 +++++++++++++------------- man/adjust_luminance.Rd | 13 ------------- man/cell_borders.Rd | 13 ------------- man/cell_fill.Rd | 13 ------------- man/cell_text.Rd | 13 ------------- man/cells_body.Rd | 23 +++-------------------- man/cells_column_labels.Rd | 23 +++-------------------- man/cells_column_spanners.Rd | 23 +++-------------------- man/cells_footnotes.Rd | 23 +++-------------------- man/cells_grand_summary.Rd | 23 +++-------------------- man/cells_row_groups.Rd | 23 +++-------------------- man/cells_source_notes.Rd | 23 +++-------------------- man/cells_stub.Rd | 23 +++-------------------- man/cells_stub_grand_summary.Rd | 23 +++-------------------- man/cells_stub_summary.Rd | 23 +++-------------------- man/cells_stubhead.Rd | 23 +++-------------------- man/cells_summary.Rd | 23 +++-------------------- man/cells_title.Rd | 23 +++-------------------- man/currency.Rd | 13 ------------- man/default_fonts.Rd | 13 ------------- man/escape_latex.Rd | 13 ------------- man/from_column.Rd | 13 ------------- man/google_font.Rd | 13 ------------- man/gt_latex_dependencies.Rd | 13 ------------- man/html.Rd | 13 ------------- man/md.Rd | 13 ------------- man/nanoplot_options.Rd | 13 ------------- man/pct.Rd | 13 ------------- man/px.Rd | 13 ------------- man/random_id.Rd | 13 ------------- man/stub.Rd | 13 ------------- man/system_fonts.Rd | 13 ------------- 32 files changed, 52 insertions(+), 507 deletions(-) diff --git a/R/helpers.R b/R/helpers.R index f0323162a1..38aa62d113 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -1171,7 +1171,7 @@ stub <- function() { #' `r man_get_image_tag(file = "man_cells_title_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-11 #' @@ -1284,7 +1284,7 @@ cells_title <- function(groups = c("title", "subtitle")) { #' `r man_get_image_tag(file = "man_cells_stubhead_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-12 #' @@ -1353,7 +1353,7 @@ cells_stubhead <- function() { #' `r man_get_image_tag(file = "man_cells_column_spanners_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-13 #' @@ -1484,7 +1484,7 @@ cells_column_spanners <- function(spanners = everything()) { #' `r man_get_image_tag(file = "man_cells_column_labels_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-14 #' @@ -1607,7 +1607,7 @@ cells_column_labels <- function(columns = everything()) { #' `r man_get_image_tag(file = "man_cells_row_groups_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-15 #' @@ -1748,7 +1748,7 @@ cells_group <- function(groups = everything()) { #' `r man_get_image_tag(file = "man_cells_stub_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-16 #' @@ -1901,7 +1901,7 @@ cells_stub <- function(rows = everything()) { #' `r man_get_image_tag(file = "man_cells_body_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-17 #' @@ -2099,7 +2099,7 @@ cells_body <- function( #' `r man_get_image_tag(file = "man_cells_summary_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-18 #' @@ -2269,7 +2269,7 @@ cells_summary <- function( #' `r man_get_image_tag(file = "man_cells_grand_summary_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-19 #' @@ -2435,7 +2435,7 @@ cells_grand_summary <- function( #' `r man_get_image_tag(file = "man_cells_stub_summary_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-20 #' @@ -2572,7 +2572,7 @@ cells_stub_summary <- function( #' `r man_get_image_tag(file = "man_cells_stub_grand_summary_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-21 #' @@ -2691,7 +2691,7 @@ cells_stub_grand_summary <- function(rows = everything()) { #' `r man_get_image_tag(file = "man_cells_footnotes_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-22 #' @@ -2792,7 +2792,7 @@ cells_footnotes <- function() { #' `r man_get_image_tag(file = "man_cells_source_notes_1.png")` #' }} #' -#' @family helper functions +#' @family location helper functions #' @section Function ID: #' 8-23 #' diff --git a/man/adjust_luminance.Rd b/man/adjust_luminance.Rd index e080522234..0caee383ab 100644 --- a/man/adjust_luminance.Rd +++ b/man/adjust_luminance.Rd @@ -104,19 +104,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/cell_borders.Rd b/man/cell_borders.Rd index d742938890..03a5e8ddb5 100644 --- a/man/cell_borders.Rd +++ b/man/cell_borders.Rd @@ -129,19 +129,6 @@ Other helper functions: \code{\link{adjust_luminance}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/cell_fill.Rd b/man/cell_fill.Rd index 2ece42f761..955a649181 100644 --- a/man/cell_fill.Rd +++ b/man/cell_fill.Rd @@ -82,19 +82,6 @@ Other helper functions: \code{\link{adjust_luminance}()}, \code{\link{cell_borders}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/cell_text.Rd b/man/cell_text.Rd index 74260e4acf..87a3ce345f 100644 --- a/man/cell_text.Rd +++ b/man/cell_text.Rd @@ -175,19 +175,6 @@ Other helper functions: \code{\link{adjust_luminance}()}, \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/cells_body.Rd b/man/cells_body.Rd index 056f38f74b..2f1d95b5d4 100644 --- a/man/cells_body.Rd +++ b/man/cells_body.Rd @@ -152,11 +152,7 @@ row in the \code{hp} column). } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, \code{\link{cells_footnotes}()}, @@ -169,19 +165,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_column_labels.Rd b/man/cells_column_labels.Rd index e5bd785c61..ea65e2bd7d 100644 --- a/man/cells_column_labels.Rd +++ b/man/cells_column_labels.Rd @@ -130,11 +130,7 @@ Add footnotes to the column labels with \code{\link[=tab_footnote]{tab_footnote( } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_spanners}()}, \code{\link{cells_footnotes}()}, @@ -147,19 +143,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_column_spanners.Rd b/man/cells_column_spanners.Rd index d3d6eaa47a..22ab1e9021 100644 --- a/man/cells_column_spanners.Rd +++ b/man/cells_column_spanners.Rd @@ -67,11 +67,7 @@ we are making the text of the column spanner label appear as bold. } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_footnotes}()}, @@ -84,19 +80,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_footnotes.Rd b/man/cells_footnotes.Rd index 5dcb2de29e..b8ecba4374 100644 --- a/man/cells_footnotes.Rd +++ b/man/cells_footnotes.Rd @@ -114,11 +114,7 @@ style the footnotes section. The styling is done through the use of the } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -131,19 +127,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_grand_summary.Rd b/man/cells_grand_summary.Rd index 75496d6821..fede4c2a4a 100644 --- a/man/cells_grand_summary.Rd +++ b/man/cells_grand_summary.Rd @@ -157,11 +157,7 @@ some styling to a grand summary cells with the \code{\link[=tab_style]{tab_style } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -174,19 +170,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_row_groups.Rd b/man/cells_row_groups.Rd index 6b25a6f899..ee2b53c484 100644 --- a/man/cells_row_groups.Rd +++ b/man/cells_row_groups.Rd @@ -122,11 +122,7 @@ function and then add a footnote to the \code{"peppr_salami"} row group label wi } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -139,19 +135,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_source_notes.Rd b/man/cells_source_notes.Rd index 989d0b8acf..2b7da77297 100644 --- a/man/cells_source_notes.Rd +++ b/man/cells_source_notes.Rd @@ -100,11 +100,7 @@ function for the targeting via the \code{locations} argument. } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -117,19 +113,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_stub.Rd b/man/cells_stub.Rd index 78728ae57d..88fef6fefa 100644 --- a/man/cells_stub.Rd +++ b/man/cells_stub.Rd @@ -115,11 +115,7 @@ using \code{cells_stub()} in \code{locations}. } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -132,19 +128,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_stub_grand_summary.Rd b/man/cells_stub_grand_summary.Rd index d3f191e9b4..cea2bd7149 100644 --- a/man/cells_stub_grand_summary.Rd +++ b/man/cells_stub_grand_summary.Rd @@ -128,11 +128,7 @@ using \code{cells_stub_grand_summary()} in the \code{locations} argument. } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -145,19 +141,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_stub_summary.Rd b/man/cells_stub_summary.Rd index 1fa9822be8..8d4d8ba1cd 100644 --- a/man/cells_stub_summary.Rd +++ b/man/cells_stub_summary.Rd @@ -157,11 +157,7 @@ some styling to the summary data stub cells with \code{\link[=tab_style]{tab_sty } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -174,19 +170,6 @@ Other helper functions: \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_stubhead.Rd b/man/cells_stubhead.Rd index b7bb3f8e42..09d6401db1 100644 --- a/man/cells_stubhead.Rd +++ b/man/cells_stubhead.Rd @@ -96,11 +96,7 @@ with \code{\link[=tab_style]{tab_style()}} in conjunction with the use of \code{ } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -113,19 +109,6 @@ Other helper functions: \code{\link{cells_stub_summary}()}, \code{\link{cells_summary}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_summary.Rd b/man/cells_summary.Rd index 61639f59d6..2914bc628c 100644 --- a/man/cells_summary.Rd +++ b/man/cells_summary.Rd @@ -193,11 +193,7 @@ some styling to the summary data cells with with \code{\link[=tab_style]{tab_sty } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -210,19 +206,6 @@ Other helper functions: \code{\link{cells_stub_summary}()}, \code{\link{cells_stubhead}()}, \code{\link{cells_title}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/cells_title.Rd b/man/cells_title.Rd index d0c6ffcb5b..77aba9f8a7 100644 --- a/man/cells_title.Rd +++ b/man/cells_title.Rd @@ -101,11 +101,7 @@ header with a title, and then add a footnote to the title with } \seealso{ -Other helper functions: -\code{\link{adjust_luminance}()}, -\code{\link{cell_borders}()}, -\code{\link{cell_fill}()}, -\code{\link{cell_text}()}, +Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, \code{\link{cells_column_spanners}()}, @@ -118,19 +114,6 @@ Other helper functions: \code{\link{cells_stub_summary}()}, \code{\link{cells_stubhead}()}, \code{\link{cells_summary}()}, -\code{\link{currency}()}, -\code{\link{default_fonts}()}, -\code{\link{escape_latex}()}, -\code{\link{from_column}()}, -\code{\link{google_font}()}, -\code{\link{gt_latex_dependencies}()}, -\code{\link{html}()}, -\code{\link{md}()}, -\code{\link{nanoplot_options}()}, -\code{\link{pct}()}, -\code{\link{px}()}, -\code{\link{random_id}()}, -\code{\link{stub}()}, -\code{\link{system_fonts}()} +\code{\link{location-helper}} } -\concept{helper functions} +\concept{location helper functions} diff --git a/man/currency.Rd b/man/currency.Rd index 8d2864bcbb..7acb854ec6 100644 --- a/man/currency.Rd +++ b/man/currency.Rd @@ -87,19 +87,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, \code{\link{from_column}()}, diff --git a/man/default_fonts.Rd b/man/default_fonts.Rd index 3d409d6d77..16a69f79de 100644 --- a/man/default_fonts.Rd +++ b/man/default_fonts.Rd @@ -67,19 +67,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{escape_latex}()}, \code{\link{from_column}()}, diff --git a/man/escape_latex.Rd b/man/escape_latex.Rd index 4e1918aa2e..88582b2d18 100644 --- a/man/escape_latex.Rd +++ b/man/escape_latex.Rd @@ -37,19 +37,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{from_column}()}, diff --git a/man/from_column.Rd b/man/from_column.Rd index 6c04ef1553..ca0db3f660 100644 --- a/man/from_column.Rd +++ b/man/from_column.Rd @@ -160,19 +160,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/google_font.Rd b/man/google_font.Rd index 0125c67fed..802ec0aa54 100644 --- a/man/google_font.Rd +++ b/man/google_font.Rd @@ -101,19 +101,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/gt_latex_dependencies.Rd b/man/gt_latex_dependencies.Rd index 3408715f1d..d534280bf3 100644 --- a/man/gt_latex_dependencies.Rd +++ b/man/gt_latex_dependencies.Rd @@ -61,19 +61,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/html.Rd b/man/html.Rd index c7f592a199..a99c08c773 100644 --- a/man/html.Rd +++ b/man/html.Rd @@ -66,19 +66,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/md.Rd b/man/md.Rd index f017be2bf7..cd508fadbd 100644 --- a/man/md.Rd +++ b/man/md.Rd @@ -60,19 +60,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/nanoplot_options.Rd b/man/nanoplot_options.Rd index 4dbd0152f4..d383a8852f 100644 --- a/man/nanoplot_options.Rd +++ b/man/nanoplot_options.Rd @@ -303,19 +303,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/pct.Rd b/man/pct.Rd index dd9c0556c5..4e5830d607 100644 --- a/man/pct.Rd +++ b/man/pct.Rd @@ -64,19 +64,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/px.Rd b/man/px.Rd index bd445973e4..73cd77fcd5 100644 --- a/man/px.Rd +++ b/man/px.Rd @@ -62,19 +62,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/random_id.Rd b/man/random_id.Rd index 7417842251..bb9b1e6eb5 100644 --- a/man/random_id.Rd +++ b/man/random_id.Rd @@ -38,19 +38,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/stub.Rd b/man/stub.Rd index 05040492f2..7aa25df4f2 100644 --- a/man/stub.Rd +++ b/man/stub.Rd @@ -60,19 +60,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, diff --git a/man/system_fonts.Rd b/man/system_fonts.Rd index be207f3324..ba39cb8ae0 100644 --- a/man/system_fonts.Rd +++ b/man/system_fonts.Rd @@ -247,19 +247,6 @@ Other helper functions: \code{\link{cell_borders}()}, \code{\link{cell_fill}()}, \code{\link{cell_text}()}, -\code{\link{cells_body}()}, -\code{\link{cells_column_labels}()}, -\code{\link{cells_column_spanners}()}, -\code{\link{cells_footnotes}()}, -\code{\link{cells_grand_summary}()}, -\code{\link{cells_row_groups}()}, -\code{\link{cells_source_notes}()}, -\code{\link{cells_stub}()}, -\code{\link{cells_stub_grand_summary}()}, -\code{\link{cells_stub_summary}()}, -\code{\link{cells_stubhead}()}, -\code{\link{cells_summary}()}, -\code{\link{cells_title}()}, \code{\link{currency}()}, \code{\link{default_fonts}()}, \code{\link{escape_latex}()}, From 5b8a13c881a8dd84fdaeb2b7cb9c0312801dafd6 Mon Sep 17 00:00:00 2001 From: olivroy Date: Sun, 12 May 2024 08:45:00 -0400 Subject: [PATCH 3/6] Remove duplication of description of location helpers --- R/helpers.R | 506 +------------------------------- man/cells_body.Rd | 45 +-- man/cells_column_labels.Rd | 45 +-- man/cells_column_spanners.Rd | 2 +- man/cells_footnotes.Rd | 45 +-- man/cells_grand_summary.Rd | 45 +-- man/cells_row_groups.Rd | 45 +-- man/cells_source_notes.Rd | 45 +-- man/cells_stub.Rd | 45 +-- man/cells_stub_grand_summary.Rd | 45 +-- man/cells_stub_summary.Rd | 45 +-- man/cells_stubhead.Rd | 45 +-- man/cells_summary.Rd | 45 +-- 13 files changed, 25 insertions(+), 978 deletions(-) diff --git a/R/helpers.R b/R/helpers.R index 38aa62d113..a94183bbe1 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -1094,7 +1094,7 @@ stub <- function() { #' #' @description #' -#' The `cells_title()` function is used to target the table title or subtitle +#' `cells_title()` is used to target the table title or subtitle #' when applying a footnote with [tab_footnote()] or adding custom style with #' [tab_style()]. The function is expressly used in each of those functions' #' `locations` argument. The header location where the title and optionally the @@ -1109,46 +1109,6 @@ stub <- function() { #' #' @return A list object of classes `cells_title` and `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Use a subset of the [`sp500`] dataset to create a small **gt** table. Add a @@ -1211,7 +1171,7 @@ cells_title <- function(groups = c("title", "subtitle")) { #' #' @description #' -#' The `cells_stubhead()` function is used to target the table stubhead location +#' `cells_stubhead()` is used to target the table stubhead location #' when applying a footnote with [tab_footnote()] or adding custom style with #' [tab_style()]. The function is expressly used in each of those functions' #' `locations` argument. The 'stubhead' location is always present alongside the @@ -1219,46 +1179,6 @@ cells_title <- function(groups = c("title", "subtitle")) { #' #' @return A list object with the classes `cells_stubhead` and `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Using a summarized version of the [`pizzaplace`] dataset, let's create a @@ -1307,7 +1227,7 @@ cells_stubhead <- function() { #' #' @description #' -#' The `cells_column_spanners()` function is used to target the cells that +#' `cells_column_spanners()` is used to target the cells that #' contain the table column spanners. This is useful when applying a footnote #' with [tab_footnote()] or adding custom style with [tab_style()]. The function #' is expressly used in each of those functions' `locations` argument. The @@ -1380,7 +1300,7 @@ cells_column_spanners <- function(spanners = everything()) { #' #' @description #' -#' The `cells_column_labels()` function is used to target the table's column +#' `cells_column_labels()` is used to target the table's column #' labels when applying a footnote with [tab_footnote()] or adding custom style #' with [tab_style()]. The function is expressly used in each of those #' functions' `locations` argument. The 'column_labels' location is present by @@ -1399,46 +1319,6 @@ cells_column_spanners <- function(spanners = everything()) { #' @return A list object with the classes `cells_column_labels` and #' `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Targeting columns with the `columns` argument: #' #' The `columns` argument allows us to target a subset of columns contained in @@ -1511,7 +1391,7 @@ cells_column_labels <- function(columns = everything()) { #' #' @description #' -#' The `cells_row_groups()` function is used to target the table's row groups +#' `cells_row_groups()` is used to target the table's row groups #' when applying a footnote with [tab_footnote()] or adding custom style with #' [tab_style()]. The function is expressly used in each of those functions' #' `locations` argument. The 'row_groups' location can be generated by the @@ -1538,46 +1418,6 @@ cells_column_labels <- function(columns = everything()) { #' groups will be considered. Providing the ID values (in quotes) of row groups #' in `c()` will serve to constrain the targeting to that subset of groups. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Let's use a summarized version of the [`pizzaplace`] dataset to create a @@ -1656,7 +1496,7 @@ cells_group <- function(groups = everything()) { #' #' @description #' -#' The `cells_stub()` function is used to target the table's stub cells and it +#' `cells_stub()` is used to target the table's stub cells and it #' is useful when applying a footnote with [tab_footnote()] or adding a custom #' style with [tab_style()]. The function is expressly used in each of those #' functions' `locations` argument. Here are several ways that a stub location @@ -1681,46 +1521,6 @@ cells_group <- function(groups = everything()) { #' #' @return A list object with the classes `cells_stub` and `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Using a transformed version of the [`sza`] dataset, let's create a **gt** @@ -1775,7 +1575,7 @@ cells_stub <- function(rows = everything()) { #' #' @description #' -#' The `cells_body()` function is used to target the data cells in the table +#' `cells_body()` is used to target the data cells in the table #' body. The function can be used to apply a footnote with [tab_footnote()], to #' add custom styling with [tab_style()], or the transform the targeted cells #' with [text_transform()]. The function is expressly used in each of those @@ -1807,46 +1607,6 @@ cells_stub <- function(rows = everything()) { #' #' @return A list object with the classes `cells_body` and `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Targeting cells with `columns` and `rows`: #' #' Targeting of values is done through `columns` and additionally by `rows` (if @@ -1936,7 +1696,7 @@ cells_body <- function( #' #' @description #' -#' The `cells_summary()` function is used to target the cells in a group summary +#' `cells_summary()` is used to target the cells in a group summary #' and it is useful when applying a footnote with [tab_footnote()] or adding a #' custom style with [tab_style()]. The function is expressly used in each of #' those functions' `locations` argument. The 'summary' location is generated by @@ -2006,46 +1766,6 @@ cells_body <- function( #' use row indices (e.g., `c(3, 5, 6)`) that correspond to the row number of a #' summary row in a row group (numbering restarts with every row group). #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Use a portion of the [`countrypops`] dataset to create a **gt** table. Add @@ -2138,7 +1858,7 @@ cells_summary <- function( #' #' @description #' -#' The `cells_grand_summary()` function is used to target the cells in a grand +#' `cells_grand_summary()` is used to target the cells in a grand #' summary and it is useful when applying a footnote with [tab_footnote()] or #' adding custom styles with [tab_style()]. The function is expressly used in #' each of those functions' `locations` argument. The 'grand_summary' location @@ -2170,46 +1890,6 @@ cells_summary <- function( #' @return A list object with the classes `cells_grand_summary` and #' `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Targeting cells with `columns` and `rows`: #' #' Targeting of grand summary cells is done through the `columns` and `rows` @@ -2304,7 +1984,7 @@ cells_grand_summary <- function( #' #' @description #' -#' The `cells_stub_summary()` function is used to target the stub cells of +#' `cells_stub_summary()` is used to target the stub cells of #' summary and it is useful when applying a footnote with [tab_footnote()] or #' adding custom styles with [tab_style()]. The function is expressly used in #' each of those functions' `locations` argument. The 'stub_summary' location is @@ -2336,46 +2016,6 @@ cells_grand_summary <- function( #' @return A list object with the classes `cells_stub_summary` and #' `location_cells`. #' -#' @section Overview of location helper Functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Targeting summary stub cells with `groups` and `rows`: #' #' Targeting the stub cells of group summary rows is done through the `groups` @@ -2470,7 +2110,7 @@ cells_stub_summary <- function( #' #' @description #' -#' The `cells_stub_grand_summary()` function is used to target the stub cells of +#' `cells_stub_grand_summary()` is used to target the stub cells of #' a grand summary and it is useful when applying a footnote with #' [tab_footnote()] or adding custom styles with [tab_style()]. The function is #' expressly used in each of those functions' `locations` argument. The @@ -2502,46 +2142,6 @@ cells_stub_summary <- function( #' use row indices (e.g., `c(3, 5, 6)`) that correspond to the row number of a #' grand summary row. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Use a portion of the [`countrypops`] dataset to create a **gt** table. Add @@ -2599,7 +2199,7 @@ cells_stub_grand_summary <- function(rows = everything()) { #' #' @description #' -#' The `cells_footnotes()` function is used to target all footnotes in the +#' `cells_footnotes()` is used to target all footnotes in the #' footer section of the table. This is useful for adding custom styles to the #' footnotes with [tab_style()] (using the `locations` argument). The #' 'footnotes' location is generated by one or more uses of the [tab_footnote()] @@ -2610,46 +2210,6 @@ cells_stub_grand_summary <- function(rows = everything()) { #' @return A list object with the classes `cells_footnotes` and #' `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Using a subset of the [`sza`] dataset, let's create a **gt** table. We'd like @@ -2715,7 +2275,7 @@ cells_footnotes <- function() { #' #' @description #' -#' The `cells_source_notes()` function is used to target all source notes in the +#' `cells_source_notes()` is used to target all source notes in the #' footer section of the table. This is useful for adding custom styles to the #' source notes with [tab_style()] (using the `locations` argument). The #' 'source_notes' location is generated by the [tab_source_note()] function. @@ -2726,46 +2286,6 @@ cells_footnotes <- function() { #' @return A list object with the classes `cells_source_notes` and #' `location_cells`. #' -#' @section Overview of location helper functions: -#' -#' Location helper functions can be used to target cells with virtually any -#' function that has a `locations` argument. Here is a listing of all of the -#' location helper functions, with locations corresponding roughly from top to -#' bottom of a table: -#' -#' - [cells_title()]: targets the table title or the table subtitle depending on -#' the value given to the `groups` argument (`"title"` or `"subtitle"`). -#' - [cells_stubhead()]: targets the stubhead location, a cell of which is only -#' available when there is a stub; a label in that location can be created by -#' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels. -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument. -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument. -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument. -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`. -#' - [cells_summary()]: targets summary cells in the table body using the -#' `groups` argument and intersections of `columns` and `rows`. -#' - [cells_grand_summary()]: targets cells of the table's grand summary using -#' intersections of `columns` and `rows` -#' - [cells_stub_summary()]: targets summary row labels in the table stub using -#' the `groups` and `rows` arguments. -#' - [cells_stub_grand_summary()]: targets grand summary row labels in the table -#' stub using the `rows` argument. -#' - [cells_footnotes()]: targets all footnotes in the table footer (cannot be -#' used with [tab_footnote()]). -#' - [cells_source_notes()]: targets all source notes in the table footer -#' (cannot be used with [tab_footnote()]). -#' -#' When using any of the location helper functions with an appropriate function -#' that has a `locations` argument (e.g., [tab_style()]), multiple locations -#' can be targeted by enclosing several `cells_*()` helper functions in a -#' `list()` (e.g., `list(cells_body(), cells_grand_summary())`). -#' #' @section Examples: #' #' Let's use a subset of the [`gtcars`] dataset to create a **gt** table. Add a diff --git a/man/cells_body.Rd b/man/cells_body.Rd index 2f1d95b5d4..9149d2debb 100644 --- a/man/cells_body.Rd +++ b/man/cells_body.Rd @@ -34,56 +34,13 @@ down to the rows we need (e.g., \verb{[colname_1] > 100 & [colname_2] < 50}).} A list object with the classes \code{cells_body} and \code{location_cells}. } \description{ -The \code{cells_body()} function is used to target the data cells in the table +\code{cells_body()} is used to target the data cells in the table body. The function can be used to apply a footnote with \code{\link[=tab_footnote]{tab_footnote()}}, to add custom styling with \code{\link[=tab_style]{tab_style()}}, or the transform the targeted cells with \code{\link[=text_transform]{text_transform()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'body' location is present by default in every \strong{gt} table. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Targeting cells with \code{columns} and \code{rows}}{ diff --git a/man/cells_column_labels.Rd b/man/cells_column_labels.Rd index ea65e2bd7d..b63501720c 100644 --- a/man/cells_column_labels.Rd +++ b/man/cells_column_labels.Rd @@ -22,55 +22,12 @@ A list object with the classes \code{cells_column_labels} and \code{location_cells}. } \description{ -The \code{cells_column_labels()} function is used to target the table's column +\code{cells_column_labels()} is used to target the table's column labels when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'column_labels' location is present by default in every \strong{gt} table. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Targeting columns with the \code{columns} argument}{ diff --git a/man/cells_column_spanners.Rd b/man/cells_column_spanners.Rd index 22ab1e9021..e394697ee8 100644 --- a/man/cells_column_spanners.Rd +++ b/man/cells_column_spanners.Rd @@ -21,7 +21,7 @@ A list object with the classes \code{cells_column_spanners} and \code{location_cells}. } \description{ -The \code{cells_column_spanners()} function is used to target the cells that +\code{cells_column_spanners()} is used to target the cells that contain the table column spanners. This is useful when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The diff --git a/man/cells_footnotes.Rd b/man/cells_footnotes.Rd index b8ecba4374..1693ae0912 100644 --- a/man/cells_footnotes.Rd +++ b/man/cells_footnotes.Rd @@ -11,7 +11,7 @@ A list object with the classes \code{cells_footnotes} and \code{location_cells}. } \description{ -The \code{cells_footnotes()} function is used to target all footnotes in the +\code{cells_footnotes()} is used to target all footnotes in the footer section of the table. This is useful for adding custom styles to the footnotes with \code{\link[=tab_style]{tab_style()}} (using the \code{locations} argument). The 'footnotes' location is generated by one or more uses of the \code{\link[=tab_footnote]{tab_footnote()}} @@ -19,49 +19,6 @@ function. This location helper function cannot be used for the \code{locations} argument of \code{\link[=tab_footnote]{tab_footnote()}} and doing so will result in a warning (with no change made to the table). } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/cells_grand_summary.Rd b/man/cells_grand_summary.Rd index fede4c2a4a..b7e2b3737c 100644 --- a/man/cells_grand_summary.Rd +++ b/man/cells_grand_summary.Rd @@ -35,55 +35,12 @@ A list object with the classes \code{cells_grand_summary} and \code{location_cells}. } \description{ -The \code{cells_grand_summary()} function is used to target the cells in a grand +\code{cells_grand_summary()} is used to target the cells in a grand summary and it is useful when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom styles with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'grand_summary' location is generated by the \code{\link[=grand_summary_rows]{grand_summary_rows()}} function. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Targeting cells with \code{columns} and \code{rows}}{ diff --git a/man/cells_row_groups.Rd b/man/cells_row_groups.Rd index ee2b53c484..946f4b67e6 100644 --- a/man/cells_row_groups.Rd +++ b/man/cells_row_groups.Rd @@ -22,7 +22,7 @@ A list object with the classes \code{cells_row_groups} and \code{location_cells}. } \description{ -The \code{cells_row_groups()} function is used to target the table's row groups +\code{cells_row_groups()} is used to target the table's row groups when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'row_groups' location can be generated by the @@ -38,49 +38,6 @@ groups will be considered. Providing the ID values (in quotes) of row groups in \code{c()} will serve to constrain the targeting to that subset of groups. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/cells_source_notes.Rd b/man/cells_source_notes.Rd index 2b7da77297..bb2b5ea043 100644 --- a/man/cells_source_notes.Rd +++ b/man/cells_source_notes.Rd @@ -11,7 +11,7 @@ A list object with the classes \code{cells_source_notes} and \code{location_cells}. } \description{ -The \code{cells_source_notes()} function is used to target all source notes in the +\code{cells_source_notes()} is used to target all source notes in the footer section of the table. This is useful for adding custom styles to the source notes with \code{\link[=tab_style]{tab_style()}} (using the \code{locations} argument). The 'source_notes' location is generated by the \code{\link[=tab_source_note]{tab_source_note()}} function. @@ -19,49 +19,6 @@ This location helper function cannot be used for the \code{locations} argument o \code{\link[=tab_footnote]{tab_footnote()}} and doing so will result in a warning (with no change made to the table). } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/cells_stub.Rd b/man/cells_stub.Rd index 88fef6fefa..d31283529b 100644 --- a/man/cells_stub.Rd +++ b/man/cells_stub.Rd @@ -23,7 +23,7 @@ expressions to filter down to the rows we need (e.g., \verb{[colname_1] > 100 & A list object with the classes \code{cells_stub} and \code{location_cells}. } \description{ -The \code{cells_stub()} function is used to target the table's stub cells and it +\code{cells_stub()} is used to target the table's stub cells and it is useful when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding a custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. Here are several ways that a stub location @@ -33,49 +33,6 @@ might be available in a \strong{gt} table: (1) through specification of a \code{\link[=grand_summary_rows]{grand_summary_rows()}} with neither of the previous two conditions being true. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/cells_stub_grand_summary.Rd b/man/cells_stub_grand_summary.Rd index cea2bd7149..b34aa1cd3d 100644 --- a/man/cells_stub_grand_summary.Rd +++ b/man/cells_stub_grand_summary.Rd @@ -24,7 +24,7 @@ A list object with the classes \code{cells_stub_grand_summary} and \code{location_cells}. } \description{ -The \code{cells_stub_grand_summary()} function is used to target the stub cells of +\code{cells_stub_grand_summary()} is used to target the stub cells of a grand summary and it is useful when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom styles with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The @@ -43,49 +43,6 @@ use row indices (e.g., \code{c(3, 5, 6)}) that correspond to the row number of a grand summary row. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/cells_stub_summary.Rd b/man/cells_stub_summary.Rd index 8d4d8ba1cd..a8837547ce 100644 --- a/man/cells_stub_summary.Rd +++ b/man/cells_stub_summary.Rd @@ -35,55 +35,12 @@ A list object with the classes \code{cells_stub_summary} and \code{location_cells}. } \description{ -The \code{cells_stub_summary()} function is used to target the stub cells of +\code{cells_stub_summary()} is used to target the stub cells of summary and it is useful when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom styles with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'stub_summary' location is generated by the \code{\link[=summary_rows]{summary_rows()}} function. } -\section{Overview of location helper Functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Targeting summary stub cells with \code{groups} and \code{rows}}{ diff --git a/man/cells_stubhead.Rd b/man/cells_stubhead.Rd index 09d6401db1..f6a950a798 100644 --- a/man/cells_stubhead.Rd +++ b/man/cells_stubhead.Rd @@ -10,55 +10,12 @@ cells_stubhead() A list object with the classes \code{cells_stubhead} and \code{location_cells}. } \description{ -The \code{cells_stubhead()} function is used to target the table stubhead location +\code{cells_stubhead()} is used to target the table stubhead location when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'stubhead' location is always present alongside the 'stub' location. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/cells_summary.Rd b/man/cells_summary.Rd index 2914bc628c..2cc6c9910c 100644 --- a/man/cells_summary.Rd +++ b/man/cells_summary.Rd @@ -49,7 +49,7 @@ down to the rows we need (e.g., \verb{[colname_1] > 100 & [colname_2] < 50}).} A list object with the classes \code{cells_summary} and \code{location_cells}. } \description{ -The \code{cells_summary()} function is used to target the cells in a group summary +\code{cells_summary()} is used to target the cells in a group summary and it is useful when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding a custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The 'summary' location is generated by @@ -85,49 +85,6 @@ use row indices (e.g., \code{c(3, 5, 6)}) that correspond to the row number of a summary row in a row group (numbering restarts with every row group). } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ From f94e6f9fb76f5c4f266b666116254482bb6c0d74 Mon Sep 17 00:00:00 2001 From: olivroy Date: Sun, 12 May 2024 08:45:40 -0400 Subject: [PATCH 4/6] Add a couple cross-refs to location-helper topic --- R/tab_create_modify.R | 22 ++++++++++----------- R/text_transform.R | 37 ++++++---------------------------- man/cells_title.Rd | 45 +----------------------------------------- man/tab_footnote.Rd | 6 +++--- man/tab_style.Rd | 16 +++++++-------- man/text_case_match.Rd | 6 +++--- man/text_case_when.Rd | 6 +++--- man/text_replace.Rd | 6 +++--- man/text_transform.Rd | 6 +++--- 9 files changed, 41 insertions(+), 109 deletions(-) diff --git a/R/tab_create_modify.R b/R/tab_create_modify.R index f90be7f31e..8b2633ed57 100644 --- a/R/tab_create_modify.R +++ b/R/tab_create_modify.R @@ -2063,8 +2063,8 @@ tab_stub_indent <- function( #' #' Each call of `tab_footnote()` will either add a different footnote to the #' footer or reuse existing footnote text therein. One or more cells outside of -#' the footer are targeted using the `cells_*()` helper functions (e.g., -#' [cells_body()], [cells_column_labels()], etc.). You can choose to *not* +#' the footer are targeted using the [`cells_*()` helper functions][location-helper] +#' (e.g., [cells_body()], [cells_column_labels()], etc.). You can choose to *not* #' attach a footnote mark by simply not specifying anything in the `locations` #' argument. #' @@ -2085,7 +2085,7 @@ tab_stub_indent <- function( #' #' @param locations *Locations to target* #' -#' `` // *default:* `NULL` (`optional`) +#' [``][location-helper] // *default:* `NULL` (`optional`) #' #' The cell or set of cells to be associated with the footnote. Supplying any #' of the `cells_*()` helper functions is a useful way to target the location @@ -2873,12 +2873,12 @@ tab_caption <- function( #' #' @description #' -#' With the `tab_style()` function we can target specific cells and apply styles -#' to them. This is best done in conjunction with the helper functions -#' [cell_text()], [cell_fill()], and [cell_borders()]. At present this function -#' is focused on the application of styles for HTML output only (as such, other -#' output formats will ignore all `tab_style()` calls). Using the aforementioned -#' helper functions, here are some of the styles we can apply: +#' With the `tab_style()` function we can [target specific cells][location-helper] +#' and apply styles to them. This is best done in conjunction with the helper +#' functions [cell_text()], [cell_fill()], and [cell_borders()]. Currently, this +#' function is focused on the application of styles for HTML output only +#' (as such, other output formats will ignore all `tab_style()` calls). +#' Using the aforementioned helper functions, here are some of the styles we can apply: #' #' - the background color of the cell ([cell_fill()]: `color`) #' - the cell's text color, font, and size ([cell_text()]: `color`, `font`, @@ -2906,7 +2906,7 @@ tab_caption <- function( #' #' @param locations *Locations to target* #' -#' `` // **required** +#' [``][location-helper] // **required** #' #' The cell or set of cells to be associated with the style. Supplying any of #' the `cells_*()` helper functions is a useful way to target the location @@ -3232,7 +3232,7 @@ tab_caption <- function( #' #' @seealso [cell_text()], [cell_fill()], and [cell_borders()] as helpers for #' defining custom styles and [cells_body()] as one of many useful helper -#' functions for targeting the locations to be styled. +#' functions for targeting the [locations][location-helper] to be styled. #' #' @export tab_style <- function( diff --git a/R/text_transform.R b/R/text_transform.R index 7c7fd857cb..d098f7f69e 100644 --- a/R/text_transform.R +++ b/R/text_transform.R @@ -52,15 +52,7 @@ #' #' The replacement text for any matched text fragments. #' -#' @param locations *Locations to target* -#' -#' `` // *default:* `cells_body()` -#' -#' The cell or set of cells to be associated with the text transformation. -#' Only the [cells_body()], [cells_stub()], [cells_row_groups()], -#' [cells_column_labels()], and [cells_column_spanners()] helper functions can -#' be used here. We can enclose several of these calls within a `list()` if we -#' wish to make the transformation happen at different locations. +#' @inheritParams text_transform #' #' @return An object of class `gt_tbl`. #' @@ -162,16 +154,7 @@ text_replace <- function( #' The replacement text to use when cell values aren't matched by any of the #' LHS inputs. If `NULL`, the default, no replacement text will be used. #' -#' @param .locations *Locations to target* -#' -#' `` // *default:* `cells_body()` -#' -#' The cell or set of cells to be associated with the text transformation. -#' Only the [cells_body()], [cells_stub()], [cells_row_groups()], -#' [cells_column_labels()], and [cells_column_spanners()] helper functions can -#' be used here. We can enclose several of these calls within a `list()` if we -#' wish to make the transformation happen at different locations. -#' +#' @inheritParams text_transform #' @return An object of class `gt_tbl`. #' #' @section Examples: @@ -324,15 +307,7 @@ text_case_when <- function( #' substrings of `old_text`. In this way, the replacements will act on those #' matched substrings. #' -#' @param .locations *Locations to target* -#' -#' `` // *default:* `cells_body()` -#' -#' The cell or set of cells to be associated with the text transformation. -#' Only the [cells_body()], [cells_stub()], [cells_row_groups()], -#' [cells_column_labels()], and [cells_column_spanners()] helper functions can -#' be used here. We can enclose several of these calls within a `list()` if we -#' wish to make the transformation happen at different locations. +#' @inheritParams text_transform #' #' @return An object of class `gt_tbl`. #' @@ -518,11 +493,11 @@ text_case_match <- function( #' #' @param locations *Locations to target* #' -#' `` // *default:* `cells_body()` +#' [``][location-helper] // *default:* `cells_body()` #' #' The cell or set of cells to be associated with the text transformation. -#' Only the [cells_body()], [cells_stub()], [cells_row_groups()], -#' [cells_column_labels()], and [cells_column_spanners()] helper functions can +#' Only the [cells_column_spanners()], [cells_column_labels()], +#' [cells_row_groups()], [cells_stub()], and [cells_body()] helper functions can #' be used here. We can enclose several of these calls within a `list()` if we #' wish to make the transformation happen at different locations. #' diff --git a/man/cells_title.Rd b/man/cells_title.Rd index 77aba9f8a7..c192ee6c81 100644 --- a/man/cells_title.Rd +++ b/man/cells_title.Rd @@ -18,55 +18,12 @@ vector to target the title element, the subtitle element, or both elements.} A list object of classes \code{cells_title} and \code{location_cells}. } \description{ -The \code{cells_title()} function is used to target the table title or subtitle +\code{cells_title()} is used to target the table title or subtitle when applying a footnote with \code{\link[=tab_footnote]{tab_footnote()}} or adding custom style with \code{\link[=tab_style]{tab_style()}}. The function is expressly used in each of those functions' \code{locations} argument. The header location where the title and optionally the subtitle reside is generated by the \code{\link[=tab_header]{tab_header()}} function. } -\section{Overview of location helper functions}{ - - -Location helper functions can be used to target cells with virtually any -function that has a \code{locations} argument. Here is a listing of all of the -location helper functions, with locations corresponding roughly from top to -bottom of a table: -\itemize{ -\item \code{\link[=cells_title]{cells_title()}}: targets the table title or the table subtitle depending on -the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle"}). -\item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only -available when there is a stub; a label in that location can be created by -using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels. -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument. -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument. -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument. -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}. -\item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the -\code{groups} argument and intersections of \code{columns} and \code{rows}. -\item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using -intersections of \code{columns} and \code{rows} -\item \code{\link[=cells_stub_summary]{cells_stub_summary()}}: targets summary row labels in the table stub using -the \code{groups} and \code{rows} arguments. -\item \code{\link[=cells_stub_grand_summary]{cells_stub_grand_summary()}}: targets grand summary row labels in the table -stub using the \code{rows} argument. -\item \code{\link[=cells_footnotes]{cells_footnotes()}}: targets all footnotes in the table footer (cannot be -used with \code{\link[=tab_footnote]{tab_footnote()}}). -\item \code{\link[=cells_source_notes]{cells_source_notes()}}: targets all source notes in the table footer -(cannot be used with \code{\link[=tab_footnote]{tab_footnote()}}). -} - -When using any of the location helper functions with an appropriate function -that has a \code{locations} argument (e.g., \code{\link[=tab_style]{tab_style()}}), multiple locations -can be targeted by enclosing several \verb{cells_*()} helper functions in a -\code{list()} (e.g., \code{list(cells_body(), cells_grand_summary())}). -} - \section{Examples}{ diff --git a/man/tab_footnote.Rd b/man/tab_footnote.Rd index 7fd7491d7b..4f32047258 100644 --- a/man/tab_footnote.Rd +++ b/man/tab_footnote.Rd @@ -29,7 +29,7 @@ in the footnote text.} \item{locations}{\emph{Locations to target} -\verb{} // \emph{default:} \code{NULL} (\code{optional}) +\code{\link[=location-helper]{}} // \emph{default:} \code{NULL} (\code{optional}) The cell or set of cells to be associated with the footnote. Supplying any of the \verb{cells_*()} helper functions is a useful way to target the location @@ -76,8 +76,8 @@ to right, top to bottom) Each call of \code{tab_footnote()} will either add a different footnote to the footer or reuse existing footnote text therein. One or more cells outside of -the footer are targeted using the \verb{cells_*()} helper functions (e.g., -\code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, etc.). You can choose to \emph{not} +the footer are targeted using the +(e.g., \code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, etc.). You can choose to \emph{not} attach a footnote mark by simply not specifying anything in the \code{locations} argument. diff --git a/man/tab_style.Rd b/man/tab_style.Rd index d7987e38f3..a09ce755a7 100644 --- a/man/tab_style.Rd +++ b/man/tab_style.Rd @@ -27,7 +27,7 @@ Custom CSS declarations can be used for HTML output by including a \item{locations}{\emph{Locations to target} -\verb{} // \strong{required} +\code{\link[=location-helper]{}} // \strong{required} The cell or set of cells to be associated with the style. Supplying any of the \verb{cells_*()} helper functions is a useful way to target the location @@ -45,12 +45,12 @@ title, etc.).} An object of class \code{gt_tbl}. } \description{ -With the \code{tab_style()} function we can target specific cells and apply styles -to them. This is best done in conjunction with the helper functions -\code{\link[=cell_text]{cell_text()}}, \code{\link[=cell_fill]{cell_fill()}}, and \code{\link[=cell_borders]{cell_borders()}}. At present this function -is focused on the application of styles for HTML output only (as such, other -output formats will ignore all \code{tab_style()} calls). Using the aforementioned -helper functions, here are some of the styles we can apply: +With the \code{tab_style()} function we can \link[=location-helper]{target specific cells} +and apply styles to them. This is best done in conjunction with the helper +functions \code{\link[=cell_text]{cell_text()}}, \code{\link[=cell_fill]{cell_fill()}}, and \code{\link[=cell_borders]{cell_borders()}}. Currently, this +function is focused on the application of styles for HTML output only +(as such, other output formats will ignore all \code{tab_style()} calls). +Using the aforementioned helper functions, here are some of the styles we can apply: \itemize{ \item the background color of the cell (\code{\link[=cell_fill]{cell_fill()}}: \code{color}) \item the cell's text color, font, and size (\code{\link[=cell_text]{cell_text()}}: \code{color}, \code{font}, @@ -377,7 +377,7 @@ to use the text in the cells of the \code{dir} column as \code{color} input valu \seealso{ \code{\link[=cell_text]{cell_text()}}, \code{\link[=cell_fill]{cell_fill()}}, and \code{\link[=cell_borders]{cell_borders()}} as helpers for defining custom styles and \code{\link[=cells_body]{cells_body()}} as one of many useful helper -functions for targeting the locations to be styled. +functions for targeting the \link[=location-helper]{locations} to be styled. Other part creation/modification functions: \code{\link{tab_caption}()}, diff --git a/man/text_case_match.Rd b/man/text_case_match.Rd index 4415d49de0..43dbc7539b 100644 --- a/man/text_case_match.Rd +++ b/man/text_case_match.Rd @@ -51,11 +51,11 @@ matched substrings.} \item{.locations}{\emph{Locations to target} -\verb{} // \emph{default:} \code{cells_body()} +\code{\link[=location-helper]{}} // \emph{default:} \code{cells_body()} The cell or set of cells to be associated with the text transformation. -Only the \code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_stub]{cells_stub()}}, \code{\link[=cells_row_groups]{cells_row_groups()}}, -\code{\link[=cells_column_labels]{cells_column_labels()}}, and \code{\link[=cells_column_spanners]{cells_column_spanners()}} helper functions can +Only the \code{\link[=cells_column_spanners]{cells_column_spanners()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, +\code{\link[=cells_row_groups]{cells_row_groups()}}, \code{\link[=cells_stub]{cells_stub()}}, and \code{\link[=cells_body]{cells_body()}} helper functions can be used here. We can enclose several of these calls within a \code{list()} if we wish to make the transformation happen at different locations.} } diff --git a/man/text_case_when.Rd b/man/text_case_when.Rd index 552b223afd..4142ae4193 100644 --- a/man/text_case_when.Rd +++ b/man/text_case_when.Rd @@ -32,11 +32,11 @@ LHS inputs. If \code{NULL}, the default, no replacement text will be used.} \item{.locations}{\emph{Locations to target} -\verb{} // \emph{default:} \code{cells_body()} +\code{\link[=location-helper]{}} // \emph{default:} \code{cells_body()} The cell or set of cells to be associated with the text transformation. -Only the \code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_stub]{cells_stub()}}, \code{\link[=cells_row_groups]{cells_row_groups()}}, -\code{\link[=cells_column_labels]{cells_column_labels()}}, and \code{\link[=cells_column_spanners]{cells_column_spanners()}} helper functions can +Only the \code{\link[=cells_column_spanners]{cells_column_spanners()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, +\code{\link[=cells_row_groups]{cells_row_groups()}}, \code{\link[=cells_stub]{cells_stub()}}, and \code{\link[=cells_body]{cells_body()}} helper functions can be used here. We can enclose several of these calls within a \code{list()} if we wish to make the transformation happen at different locations.} } diff --git a/man/text_replace.Rd b/man/text_replace.Rd index c9af857de5..e940197fe4 100644 --- a/man/text_replace.Rd +++ b/man/text_replace.Rd @@ -29,11 +29,11 @@ The replacement text for any matched text fragments.} \item{locations}{\emph{Locations to target} -\verb{} // \emph{default:} \code{cells_body()} +\code{\link[=location-helper]{}} // \emph{default:} \code{cells_body()} The cell or set of cells to be associated with the text transformation. -Only the \code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_stub]{cells_stub()}}, \code{\link[=cells_row_groups]{cells_row_groups()}}, -\code{\link[=cells_column_labels]{cells_column_labels()}}, and \code{\link[=cells_column_spanners]{cells_column_spanners()}} helper functions can +Only the \code{\link[=cells_column_spanners]{cells_column_spanners()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, +\code{\link[=cells_row_groups]{cells_row_groups()}}, \code{\link[=cells_stub]{cells_stub()}}, and \code{\link[=cells_body]{cells_body()}} helper functions can be used here. We can enclose several of these calls within a \code{list()} if we wish to make the transformation happen at different locations.} } diff --git a/man/text_transform.Rd b/man/text_transform.Rd index 3466095c8e..98ef318985 100644 --- a/man/text_transform.Rd +++ b/man/text_transform.Rd @@ -23,11 +23,11 @@ argument and return a character vector of the same length as the input \code{x}. \item{locations}{\emph{Locations to target} -\verb{} // \emph{default:} \code{cells_body()} +\code{\link[=location-helper]{}} // \emph{default:} \code{cells_body()} The cell or set of cells to be associated with the text transformation. -Only the \code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_stub]{cells_stub()}}, \code{\link[=cells_row_groups]{cells_row_groups()}}, -\code{\link[=cells_column_labels]{cells_column_labels()}}, and \code{\link[=cells_column_spanners]{cells_column_spanners()}} helper functions can +Only the \code{\link[=cells_column_spanners]{cells_column_spanners()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, +\code{\link[=cells_row_groups]{cells_row_groups()}}, \code{\link[=cells_stub]{cells_stub()}}, and \code{\link[=cells_body]{cells_body()}} helper functions can be used here. We can enclose several of these calls within a \code{list()} if we wish to make the transformation happen at different locations.} } From fa9f42430b924114e897e619b7dec7285ab8a057 Mon Sep 17 00:00:00 2001 From: olivroy Date: Sun, 12 May 2024 08:54:22 -0400 Subject: [PATCH 5/6] Couple tweaks + pkgdown check --- R/tab_create_modify.R | 2 +- R/topics.R | 24 +++++++++++++----------- man/location-helper.Rd | 24 +++++++++++++----------- man/tab_footnote.Rd | 2 +- pkgdown/_pkgdown.yml | 14 +------------- 5 files changed, 29 insertions(+), 37 deletions(-) diff --git a/R/tab_create_modify.R b/R/tab_create_modify.R index 8b2633ed57..d2361fa73f 100644 --- a/R/tab_create_modify.R +++ b/R/tab_create_modify.R @@ -2063,7 +2063,7 @@ tab_stub_indent <- function( #' #' Each call of `tab_footnote()` will either add a different footnote to the #' footer or reuse existing footnote text therein. One or more cells outside of -#' the footer are targeted using the [`cells_*()` helper functions][location-helper] +#' the footer are targeted using the [`cells_*()`][location-helper] helper functions #' (e.g., [cells_body()], [cells_column_labels()], etc.). You can choose to *not* #' attach a footnote mark by simply not specifying anything in the `locations` #' argument. diff --git a/R/topics.R b/R/topics.R index fd78d5eff3..18f66ea04c 100644 --- a/R/topics.R +++ b/R/topics.R @@ -10,16 +10,16 @@ #' - [cells_stubhead()]: targets the stubhead location, a cell of which is only #' available when there is a stub; a label in that location can be created by #' using the [tab_stubhead()] function. -#' - [cells_column_spanners()]: targets the spanner column labels with the -#' `spanners` argument; spanner column labels appear above the column labels.* -#' - [cells_column_labels()]: targets the column labels with its `columns` -#' argument.* -#' - [cells_row_groups()]: targets the row group labels in any available row -#' groups using the `groups` argument.* -#' - [cells_stub()]: targets row labels in the table stub using the `rows` -#' argument.* -#' - [cells_body()]: targets data cells in the table body using intersections of -#' `columns` and `rows`.* +#' - [cells_column_spanners()]*: targets the spanner column labels with the +#' `spanners` argument; spanner column labels appear above the column labels. +#' - [cells_column_labels()]*: targets the column labels with its `columns` +#' argument. +#' - [cells_row_groups()]*: targets the row group labels in any available row +#' groups using the `groups` argument. +#' - [cells_stub()]*: targets row labels in the table stub using the `rows` +#' argument. +#' - [cells_body()]*: targets data cells in the table body using intersections of +#' `columns` and `rows`. #' - [cells_summary()]: targets summary cells in the table body using the #' `groups` argument and intersections of `columns` and `rows`. #' - [cells_grand_summary()]: targets cells of the table's grand summary using @@ -45,7 +45,7 @@ #' @family location helper functions #' #' @seealso -#' Functions that use these helper function with `locations`: +#' Functions with `locations` argument: #' #' * [tab_footnote()] #' * [tab_style()] @@ -53,4 +53,6 @@ #' * [text_replace()] #' * [text_case_when()] #' * [text_case_match()] +#' +#' These functions contain more example of usage. NULL diff --git a/man/location-helper.Rd b/man/location-helper.Rd index b567741f62..9e6fca9f19 100644 --- a/man/location-helper.Rd +++ b/man/location-helper.Rd @@ -12,16 +12,16 @@ the value given to the \code{groups} argument (\code{"title"} or \code{"subtitle \item \code{\link[=cells_stubhead]{cells_stubhead()}}: targets the stubhead location, a cell of which is only available when there is a stub; a label in that location can be created by using the \code{\link[=tab_stubhead]{tab_stubhead()}} function. -\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}: targets the spanner column labels with the -\code{spanners} argument; spanner column labels appear above the column labels.* -\item \code{\link[=cells_column_labels]{cells_column_labels()}}: targets the column labels with its \code{columns} -argument.* -\item \code{\link[=cells_row_groups]{cells_row_groups()}}: targets the row group labels in any available row -groups using the \code{groups} argument.* -\item \code{\link[=cells_stub]{cells_stub()}}: targets row labels in the table stub using the \code{rows} -argument.* -\item \code{\link[=cells_body]{cells_body()}}: targets data cells in the table body using intersections of -\code{columns} and \code{rows}.* +\item \code{\link[=cells_column_spanners]{cells_column_spanners()}}*: targets the spanner column labels with the +\code{spanners} argument; spanner column labels appear above the column labels. +\item \code{\link[=cells_column_labels]{cells_column_labels()}}*: targets the column labels with its \code{columns} +argument. +\item \code{\link[=cells_row_groups]{cells_row_groups()}}*: targets the row group labels in any available row +groups using the \code{groups} argument. +\item \code{\link[=cells_stub]{cells_stub()}}*: targets row labels in the table stub using the \code{rows} +argument. +\item \code{\link[=cells_body]{cells_body()}}*: targets data cells in the table body using intersections of +\code{columns} and \code{rows}. \item \code{\link[=cells_summary]{cells_summary()}}: targets summary cells in the table body using the \code{groups} argument and intersections of \code{columns} and \code{rows}. \item \code{\link[=cells_grand_summary]{cells_grand_summary()}}: targets cells of the table's grand summary using @@ -46,7 +46,7 @@ can be targeted by enclosing several \verb{cells_*()} helper functions in a } \seealso{ -Functions that use these helper function with \code{locations}: +Functions with \code{locations} argument: \itemize{ \item \code{\link[=tab_footnote]{tab_footnote()}} \item \code{\link[=tab_style]{tab_style()}} @@ -56,6 +56,8 @@ Functions that use these helper function with \code{locations}: \item \code{\link[=text_case_match]{text_case_match()}} } +These functions contain more example of usage. + Other location helper functions: \code{\link{cells_body}()}, \code{\link{cells_column_labels}()}, diff --git a/man/tab_footnote.Rd b/man/tab_footnote.Rd index 4f32047258..b7d8e18fd0 100644 --- a/man/tab_footnote.Rd +++ b/man/tab_footnote.Rd @@ -76,7 +76,7 @@ to right, top to bottom) Each call of \code{tab_footnote()} will either add a different footnote to the footer or reuse existing footnote text therein. One or more cells outside of -the footer are targeted using the +the footer are targeted using the \code{\link[=location-helper]{cells_*()}} helper functions (e.g., \code{\link[=cells_body]{cells_body()}}, \code{\link[=cells_column_labels]{cells_column_labels()}}, etc.). You can choose to \emph{not} attach a footnote mark by simply not specifying anything in the \code{locations} argument. diff --git a/pkgdown/_pkgdown.yml b/pkgdown/_pkgdown.yml index 71fd26eaad..3fa05fb996 100644 --- a/pkgdown/_pkgdown.yml +++ b/pkgdown/_pkgdown.yml @@ -202,19 +202,7 @@ reference: - nanoplot_options - adjust_luminance - stub - - cells_title - - cells_stubhead - - cells_column_spanners - - cells_column_labels - - cells_row_groups - - cells_stub - - cells_body - - cells_summary - - cells_grand_summary - - cells_stub_summary - - cells_stub_grand_summary - - cells_footnotes - - cells_source_notes + - has_concept("location helper functions") - cell_text - cell_fill - cell_borders From 398b88c5ab5d62344865f4349c23bcd68e71b5d9 Mon Sep 17 00:00:00 2001 From: olivroy Date: Sun, 12 May 2024 09:05:13 -0400 Subject: [PATCH 6/6] spacing consistency --- R/text_transform.R | 1 + 1 file changed, 1 insertion(+) diff --git a/R/text_transform.R b/R/text_transform.R index d098f7f69e..430cbb2f89 100644 --- a/R/text_transform.R +++ b/R/text_transform.R @@ -155,6 +155,7 @@ text_replace <- function( #' LHS inputs. If `NULL`, the default, no replacement text will be used. #' #' @inheritParams text_transform +#' #' @return An object of class `gt_tbl`. #' #' @section Examples: