From a596b155dd20c5c7b043dc56a0d24c7ae83e01d2 Mon Sep 17 00:00:00 2001 From: olivroy Date: Wed, 19 Jun 2024 11:54:16 -0400 Subject: [PATCH 1/5] Avoid creating a link for `c()` --- R/data_color.R | 4 +- R/export.R | 2 +- R/format_data.R | 4 +- R/gt_split.R | 476 ++++++++++++++++---------------- R/helpers.R | 16 +- R/modify_columns.R | 38 +-- R/rows_add.R | 2 +- R/substitution.R | 20 +- R/summary_rows.R | 4 +- R/tab_create_modify.R | 8 +- R/tab_style_body.R | 4 +- man/cells_body.Rd | 4 +- man/cells_column_labels.Rd | 2 +- man/cells_column_spanners.Rd | 2 +- man/cells_grand_summary.Rd | 4 +- man/cells_group.Rd | 2 +- man/cells_row_groups.Rd | 2 +- man/cells_stub.Rd | 2 +- man/cells_stub_grand_summary.Rd | 2 +- man/cells_stub_summary.Rd | 4 +- man/cells_summary.Rd | 6 +- man/cols_align.Rd | 2 +- man/cols_align_decimal.Rd | 2 +- man/cols_hide.Rd | 2 +- man/cols_label.Rd | 2 +- man/cols_label_with.Rd | 2 +- man/cols_merge.Rd | 4 +- man/cols_merge_n_pct.Rd | 2 +- man/cols_merge_range.Rd | 2 +- man/cols_merge_uncert.Rd | 2 +- man/cols_move.Rd | 2 +- man/cols_move_to_end.Rd | 2 +- man/cols_move_to_start.Rd | 2 +- man/cols_nanoplot.Rd | 6 +- man/cols_unhide.Rd | 2 +- man/cols_units.Rd | 2 +- man/cols_width.Rd | 2 +- man/data_color.Rd | 4 +- man/extract_cells.Rd | 4 +- man/fmt.Rd | 4 +- man/fmt_auto.Rd | 4 +- man/fmt_bins.Rd | 4 +- man/fmt_bytes.Rd | 4 +- man/fmt_chem.Rd | 4 +- man/fmt_country.Rd | 4 +- man/fmt_currency.Rd | 4 +- man/fmt_date.Rd | 4 +- man/fmt_datetime.Rd | 4 +- man/fmt_duration.Rd | 4 +- man/fmt_email.Rd | 4 +- man/fmt_engineering.Rd | 4 +- man/fmt_flag.Rd | 4 +- man/fmt_fraction.Rd | 4 +- man/fmt_icon.Rd | 4 +- man/fmt_image.Rd | 4 +- man/fmt_index.Rd | 4 +- man/fmt_integer.Rd | 4 +- man/fmt_markdown.Rd | 4 +- man/fmt_missing.Rd | 4 +- man/fmt_number.Rd | 4 +- man/fmt_partsper.Rd | 4 +- man/fmt_passthrough.Rd | 4 +- man/fmt_percent.Rd | 4 +- man/fmt_roman.Rd | 4 +- man/fmt_scientific.Rd | 4 +- man/fmt_spelled_num.Rd | 4 +- man/fmt_tf.Rd | 4 +- man/fmt_time.Rd | 4 +- man/fmt_units.Rd | 4 +- man/fmt_url.Rd | 4 +- man/grand_summary_rows.Rd | 2 +- man/gt_split.Rd | 2 +- man/rows_add.Rd | 2 +- man/sub_large_vals.Rd | 4 +- man/sub_missing.Rd | 4 +- man/sub_small_vals.Rd | 4 +- man/sub_values.Rd | 4 +- man/sub_zero.Rd | 4 +- man/summary_rows.Rd | 4 +- man/tab_row_group.Rd | 2 +- man/tab_spanner.Rd | 2 +- man/tab_spanner_delim.Rd | 2 +- man/tab_stub_indent.Rd | 2 +- man/tab_style_body.Rd | 4 +- 84 files changed, 410 insertions(+), 410 deletions(-) diff --git a/R/data_color.R b/R/data_color.R index 56356d22ce..21022e29ef 100644 --- a/R/data_color.R +++ b/R/data_color.R @@ -71,7 +71,7 @@ #' `` // *default:* `everything()` #' #' The columns to which cell data color operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -83,7 +83,7 @@ #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for cell data color operations. The default #' [everything()] results in all rows in `columns` being formatted. -#' Alternatively, we can supply a vector of row IDs within [c()], a vector of +#' Alternatively, we can supply a vector of row IDs within `c()`, a vector of #' row indices, or a select helper function. Examples of select helper #' functions include [starts_with()], [ends_with()], [contains()], #' [matches()], [one_of()], [num_range()], and [everything()]. We can also use diff --git a/R/export.R b/R/export.R index 17324ab2f5..d8f922d168 100644 --- a/R/export.R +++ b/R/export.R @@ -1790,7 +1790,7 @@ extract_summary <- function(data) { #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for extraction. The default [everything()] results in all #' rows in `columns` being formatted. Alternatively, we can supply a vector of -#' row IDs within [c()], a vector of row indices, or a select helper function. +#' row IDs within `c()`, a vector of row indices, or a select helper function. #' Examples of select helper functions include [starts_with()], [ends_with()], #' [contains()], [matches()], [one_of()], [num_range()], and [everything()]. #' We can also use expressions to filter down to the rows we need (e.g., diff --git a/R/format_data.R b/R/format_data.R index 244b23793e..1ad36d5a8d 100644 --- a/R/format_data.R +++ b/R/format_data.R @@ -54,7 +54,7 @@ #' #' `` // *default:* `everything()` #' -#' Can either be a series of column names provided in [c()], a vector of +#' Can either be a series of column names provided in `c()`, a vector of #' column indices, or a select helper function. Examples of select helper #' functions include [starts_with()], [ends_with()], [contains()], #' [matches()], [one_of()], [num_range()], and [everything()]. @@ -66,7 +66,7 @@ #' In conjunction with `columns`, we can specify which of their rows should #' undergo formatting. The default [everything()] results in all rows in #' `columns` being formatted. Alternatively, we can supply a vector of row -#' captions within [c()], a vector of row indices, or a select helper +#' captions within `c()`, a vector of row indices, or a select helper #' function. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. We can also use expressions to filter down to the rows we diff --git a/R/gt_split.R b/R/gt_split.R index 813c2f31e8..46e15751ca 100644 --- a/R/gt_split.R +++ b/R/gt_split.R @@ -1,238 +1,238 @@ -#------------------------------------------------------------------------------# -# -# /$$ -# | $$ -# /$$$$$$ /$$$$$$ -# /$$__ $$|_ $$_/ -# | $$ \ $$ | $$ -# | $$ | $$ | $$ /$$ -# | $$$$$$$ | $$$$/ -# \____ $$ \___/ -# /$$ \ $$ -# | $$$$$$/ -# \______/ -# -# This file is part of the 'rstudio/gt' project. -# -# Copyright (c) 2018-2024 gt authors -# -# For full copyright and license information, please look at -# https://gt.rstudio.com/LICENSE.html -# -#------------------------------------------------------------------------------# - - -#' Split a table into a group of tables (a `gt_group`) -#' -#' @description -#' -#' With a **gt** table, you can split it into multiple tables and get that -#' collection in a `gt_group` object. This function is useful for those cases -#' where you want to section up a table in a specific way and print those -#' smaller tables across multiple pages (in RTF and Word outputs, primarily via -#' [gtsave()]), or, with breaks between them when the output context is HTML. -#' -#' @inheritParams fmt_number -#' -#' @param row_every_n *Split at every n rows* -#' -#' `scalar` // *default:* `NULL` (`optional`) -#' -#' A directive to split at every *n* number of rows. This argument expects a -#' single numerical value. -#' -#' @param row_slice_i *Row-slicing indices* -#' -#' `vector` // *default:* `NULL` (`optional`) -#' -#' An argument for splitting at specific row indices. Here, we expect either a -#' vector of index values or a function that evaluates to a numeric vector. -#' -#' @param col_slice_at *Column-slicing locations* -#' -#' `` // *default:* `NULL` (`optional`) -#' -#' Any columns where vertical splitting across should occur. The splits occur -#' to the right of the resolved column names. Can either be a series of column -#' names provided in [c()], a vector of column indices, or a select helper -#' function. Examples of select helper functions include [starts_with()], -#' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and -#' [everything()]. -#' -#' @return An object of class `gt_group`. -#' -#' @section Examples: -#' -#' Use a subset of the [`gtcars`] dataset to create a **gt** table. Format the -#' `msrp` column to display numbers as currency values, set column widths with -#' [cols_width()], and split the table at every five rows with `gt_split()`. -#' This creates a `gt_group` object containing two tables. Printing this object -#' yields two tables separated by a line break. -#' -#' ```r -#' gtcars |> -#' dplyr::slice_head(n = 10) |> -#' dplyr::select(mfr, model, year, msrp) |> -#' gt() |> -#' fmt_currency(columns = msrp) |> -#' cols_width( -#' year ~ px(80), -#' everything() ~ px(150) -#' ) |> -#' gt_split(row_every_n = 5) -#' ``` -#' -#' \if{html}{\out{ -#' `r man_get_image_tag(file = "man_gt_split_1.png")` -#' }} -#' -#' Use a smaller subset of the [`gtcars`] dataset to create a **gt** table. -#' Format the `msrp` column to display numbers as currency values, set the table -#' width with [tab_options()] and split the table at the `model` column This -#' creates a `gt_group` object again containing two tables but this time we get -#' a vertical split. Printing this object yields two tables of the same width. -#' -#' ```r -#' gtcars |> -#' dplyr::slice_head(n = 5) |> -#' dplyr::select(mfr, model, year, msrp) |> -#' gt() |> -#' fmt_currency(columns = msrp) |> -#' tab_options(table.width = px(400)) |> -#' gt_split(col_slice_at = "model") -#' ``` -#' -#' \if{html}{\out{ -#' `r man_get_image_tag(file = "man_gt_split_2.png")` -#' }} -#' -#' @family table group functions -#' @section Function ID: -#' 14-2 -#' -#' @section Function Introduced: -#' `v0.9.0` (Mar 31, 2023) -#' -#' @export -gt_split <- function( - data, - row_every_n = NULL, - row_slice_i = NULL, - col_slice_at = NULL -) { - - # Perform input object validation - stop_if_not_gt_tbl(data = data) - - # Resolution of columns as character vectors - col_slice_at <- - resolve_cols_c( - expr = {{ col_slice_at }}, - data = data, - null_means = "nothing" - ) - - gt_tbl_built <- build_data(data = data, context = "html") - - # Get row count for table (data rows) - n_rows_data <- nrow(gt_tbl_built[["_stub_df"]]) - - row_slice_vec <- rep(1L, n_rows_data) - - row_every_n_idx <- c() - if (!is.null(row_every_n)) { - row_every_n_idx <- seq_len(n_rows_data)[seq(0, n_rows_data, row_every_n)] - } - - row_slice_i_idx <- c() - if (!is.null(row_slice_i)) { - row_slice_i_idx <- row_slice_i - } - - row_idx <- sort(unique(c(row_every_n_idx, row_slice_i_idx))) - - group_i <- 0L - - for (i in seq_along(row_slice_vec)) { - - if (i %in% (row_idx + 1)) { - group_i <- group_i + 1L - } - - row_slice_vec[i] <- row_slice_vec[i] + group_i - } - - row_range_list <- - split( - seq_len(n_rows_data), - row_slice_vec - ) - - gt_tbl_main <- data - - gt_group <- gt_group(.use_grp_opts = FALSE) - - for (i in seq_along(row_range_list)) { - - gt_tbl_i <- gt_tbl_main - - gt_tbl_i[["_data"]] <- gt_tbl_i[["_data"]][row_range_list[[i]], ] - gt_tbl_i[["_stub_df"]] <- gt_tbl_i[["_stub_df"]][row_range_list[[i]], ] - - if (!is.null(col_slice_at)) { - - # Get all visible vars in their finalized order - visible_col_vars <- dt_boxhead_get_vars_default(data = data) - - # Stop function if any of the columns to split at aren't visible columns - if (!all(col_slice_at %in% visible_col_vars)) { - cli::cli_abort( - "All values provided in `col_slice_at` must correspond to visible columns." - ) - } - - # Obtain all of the column indices for vertical splitting - col_idx <- which(visible_col_vars %in% col_slice_at) - - col_slice_vec <- rep(1L, length(visible_col_vars)) - - group_j <- 0L - - for (i in seq_along(col_slice_vec)) { - - if (i %in% (col_idx + 1)) { - group_j <- group_j + 1L - } - - col_slice_vec[i] <- col_slice_vec[i] + group_j - } - - col_range_list <- - split( - seq_along(visible_col_vars), - col_slice_vec - ) - - for (j in seq_along(col_range_list)) { - - gt_tbl_j <- gt_tbl_i - - gt_tbl_j[["_data"]] <- - gt_tbl_j[["_data"]][, visible_col_vars[col_range_list[[j]]]] - - gt_tbl_j[["_boxhead"]] <- - gt_tbl_j[["_boxhead"]][ - gt_tbl_j[["_boxhead"]]$var %in% visible_col_vars[col_range_list[[j]]], - ] - - gt_group <- grp_add(gt_group, gt_tbl_j) - } - - - } else { - gt_group <- grp_add(gt_group, gt_tbl_i) - } - } - - gt_group -} +#------------------------------------------------------------------------------# +# +# /$$ +# | $$ +# /$$$$$$ /$$$$$$ +# /$$__ $$|_ $$_/ +# | $$ \ $$ | $$ +# | $$ | $$ | $$ /$$ +# | $$$$$$$ | $$$$/ +# \____ $$ \___/ +# /$$ \ $$ +# | $$$$$$/ +# \______/ +# +# This file is part of the 'rstudio/gt' project. +# +# Copyright (c) 2018-2024 gt authors +# +# For full copyright and license information, please look at +# https://gt.rstudio.com/LICENSE.html +# +#------------------------------------------------------------------------------# + + +#' Split a table into a group of tables (a `gt_group`) +#' +#' @description +#' +#' With a **gt** table, you can split it into multiple tables and get that +#' collection in a `gt_group` object. This function is useful for those cases +#' where you want to section up a table in a specific way and print those +#' smaller tables across multiple pages (in RTF and Word outputs, primarily via +#' [gtsave()]), or, with breaks between them when the output context is HTML. +#' +#' @inheritParams fmt_number +#' +#' @param row_every_n *Split at every n rows* +#' +#' `scalar` // *default:* `NULL` (`optional`) +#' +#' A directive to split at every *n* number of rows. This argument expects a +#' single numerical value. +#' +#' @param row_slice_i *Row-slicing indices* +#' +#' `vector` // *default:* `NULL` (`optional`) +#' +#' An argument for splitting at specific row indices. Here, we expect either a +#' vector of index values or a function that evaluates to a numeric vector. +#' +#' @param col_slice_at *Column-slicing locations* +#' +#' `` // *default:* `NULL` (`optional`) +#' +#' Any columns where vertical splitting across should occur. The splits occur +#' to the right of the resolved column names. Can either be a series of column +#' names provided in `c()`, a vector of column indices, or a select helper +#' function. Examples of select helper functions include [starts_with()], +#' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and +#' [everything()]. +#' +#' @return An object of class `gt_group`. +#' +#' @section Examples: +#' +#' Use a subset of the [`gtcars`] dataset to create a **gt** table. Format the +#' `msrp` column to display numbers as currency values, set column widths with +#' [cols_width()], and split the table at every five rows with `gt_split()`. +#' This creates a `gt_group` object containing two tables. Printing this object +#' yields two tables separated by a line break. +#' +#' ```r +#' gtcars |> +#' dplyr::slice_head(n = 10) |> +#' dplyr::select(mfr, model, year, msrp) |> +#' gt() |> +#' fmt_currency(columns = msrp) |> +#' cols_width( +#' year ~ px(80), +#' everything() ~ px(150) +#' ) |> +#' gt_split(row_every_n = 5) +#' ``` +#' +#' \if{html}{\out{ +#' `r man_get_image_tag(file = "man_gt_split_1.png")` +#' }} +#' +#' Use a smaller subset of the [`gtcars`] dataset to create a **gt** table. +#' Format the `msrp` column to display numbers as currency values, set the table +#' width with [tab_options()] and split the table at the `model` column This +#' creates a `gt_group` object again containing two tables but this time we get +#' a vertical split. Printing this object yields two tables of the same width. +#' +#' ```r +#' gtcars |> +#' dplyr::slice_head(n = 5) |> +#' dplyr::select(mfr, model, year, msrp) |> +#' gt() |> +#' fmt_currency(columns = msrp) |> +#' tab_options(table.width = px(400)) |> +#' gt_split(col_slice_at = "model") +#' ``` +#' +#' \if{html}{\out{ +#' `r man_get_image_tag(file = "man_gt_split_2.png")` +#' }} +#' +#' @family table group functions +#' @section Function ID: +#' 14-2 +#' +#' @section Function Introduced: +#' `v0.9.0` (Mar 31, 2023) +#' +#' @export +gt_split <- function( + data, + row_every_n = NULL, + row_slice_i = NULL, + col_slice_at = NULL +) { + + # Perform input object validation + stop_if_not_gt_tbl(data = data) + + # Resolution of columns as character vectors + col_slice_at <- + resolve_cols_c( + expr = {{ col_slice_at }}, + data = data, + null_means = "nothing" + ) + + gt_tbl_built <- build_data(data = data, context = "html") + + # Get row count for table (data rows) + n_rows_data <- nrow(gt_tbl_built[["_stub_df"]]) + + row_slice_vec <- rep(1L, n_rows_data) + + row_every_n_idx <- c() + if (!is.null(row_every_n)) { + row_every_n_idx <- seq_len(n_rows_data)[seq(0, n_rows_data, row_every_n)] + } + + row_slice_i_idx <- c() + if (!is.null(row_slice_i)) { + row_slice_i_idx <- row_slice_i + } + + row_idx <- sort(unique(c(row_every_n_idx, row_slice_i_idx))) + + group_i <- 0L + + for (i in seq_along(row_slice_vec)) { + + if (i %in% (row_idx + 1)) { + group_i <- group_i + 1L + } + + row_slice_vec[i] <- row_slice_vec[i] + group_i + } + + row_range_list <- + split( + seq_len(n_rows_data), + row_slice_vec + ) + + gt_tbl_main <- data + + gt_group <- gt_group(.use_grp_opts = FALSE) + + for (i in seq_along(row_range_list)) { + + gt_tbl_i <- gt_tbl_main + + gt_tbl_i[["_data"]] <- gt_tbl_i[["_data"]][row_range_list[[i]], ] + gt_tbl_i[["_stub_df"]] <- gt_tbl_i[["_stub_df"]][row_range_list[[i]], ] + + if (!is.null(col_slice_at)) { + + # Get all visible vars in their finalized order + visible_col_vars <- dt_boxhead_get_vars_default(data = data) + + # Stop function if any of the columns to split at aren't visible columns + if (!all(col_slice_at %in% visible_col_vars)) { + cli::cli_abort( + "All values provided in `col_slice_at` must correspond to visible columns." + ) + } + + # Obtain all of the column indices for vertical splitting + col_idx <- which(visible_col_vars %in% col_slice_at) + + col_slice_vec <- rep(1L, length(visible_col_vars)) + + group_j <- 0L + + for (i in seq_along(col_slice_vec)) { + + if (i %in% (col_idx + 1)) { + group_j <- group_j + 1L + } + + col_slice_vec[i] <- col_slice_vec[i] + group_j + } + + col_range_list <- + split( + seq_along(visible_col_vars), + col_slice_vec + ) + + for (j in seq_along(col_range_list)) { + + gt_tbl_j <- gt_tbl_i + + gt_tbl_j[["_data"]] <- + gt_tbl_j[["_data"]][, visible_col_vars[col_range_list[[j]]]] + + gt_tbl_j[["_boxhead"]] <- + gt_tbl_j[["_boxhead"]][ + gt_tbl_j[["_boxhead"]]$var %in% visible_col_vars[col_range_list[[j]]], + ] + + gt_group <- grp_add(gt_group, gt_tbl_j) + } + + + } else { + gt_group <- grp_add(gt_group, gt_tbl_i) + } + } + + gt_group +} diff --git a/R/helpers.R b/R/helpers.R index 02623e36ff..87b33e8beb 100644 --- a/R/helpers.R +++ b/R/helpers.R @@ -1351,7 +1351,7 @@ cells_stubhead <- function() { #' `` // *default:* `everything()` #' #' The spanners to which targeting operations are constrained. Can either be a -#' series of spanner ID values provided in [c()] or a select helper function. +#' series of spanner ID values provided in `c()` or a select helper function. #' Examples of select helper functions include [starts_with()], [ends_with()], #' [contains()], [matches()], [one_of()], [num_range()], and [everything()]. #' @@ -1507,7 +1507,7 @@ cells_column_labels <- function(columns = everything()) { #' `` // *default:* `everything()` #' #' The row groups to which targeting operations are constrained. Can either be -#' a series of row group ID values provided in [c()] or a select helper +#' a series of row group ID values provided in `c()` or a select helper #' function. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. @@ -1614,7 +1614,7 @@ cells_group <- function(groups = everything()) { #' #' The rows to which targeting operations are constrained. The default #' [everything()] results in all rows in `columns` being formatted. -#' Alternatively, we can supply a vector of row IDs within [c()], a vector of +#' Alternatively, we can supply a vector of row IDs within `c()`, a vector of #' row indices, or a select helper function. Examples of select helper #' functions include [starts_with()], [ends_with()], [contains()], #' [matches()], [one_of()], [num_range()], and [everything()]. We can also use @@ -1689,7 +1689,7 @@ cells_stub <- function(rows = everything()) { #' `` // *default:* `everything()` #' #' The columns to which targeting operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -1701,7 +1701,7 @@ cells_stub <- function(rows = everything()) { #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -1810,7 +1810,7 @@ cells_body <- function( #' #' The row groups to which targeting operations are constrained. This aids in #' targeting the summary rows that reside in certain row groups. Can either be -#' a series of row group ID values provided in [c()] or a select helper +#' a series of row group ID values provided in `c()` or a select helper #' function. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. @@ -2059,7 +2059,7 @@ cells_grand_summary <- function( #' In conjunction with `groups`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -2174,7 +2174,7 @@ cells_stub_summary <- function( #' #' We can specify which rows should be targeted. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter diff --git a/R/modify_columns.R b/R/modify_columns.R index 15291ba8d1..765f7c3e22 100644 --- a/R/modify_columns.R +++ b/R/modify_columns.R @@ -53,7 +53,7 @@ #' `` // *default:* `everything()` #' #' The columns for which the alignment should be applied. Can either be a -#' series of column names provided in [c()], a vector of column indices, or a +#' series of column names provided in `c()`, a vector of column indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. By default this is set to [everything()] @@ -208,7 +208,7 @@ determine_which_character_number <- function( #' `` // *default:* `everything()` #' #' The columns for which decimal alignment should be applied. Can either be a -#' series of column names provided in [c()], a vector of column indices, or a +#' series of column names provided in `c()`, a vector of column indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. By default this is set to [everything()] @@ -448,7 +448,7 @@ align_to_char <- function(x, align_at = ".") { #' left-hand side corresponds to selections of columns and the right-hand side #' evaluates to single-length character values in the form `{##}px` (i.e., #' pixel dimensions); the [px()] helper function is best used for this -#' purpose. Column names should be enclosed in [c()]. The column-based select +#' purpose. Column names should be enclosed in `c()`. The column-based select #' helpers [starts_with()], [ends_with()], [contains()], [matches()], #' [one_of()], and [everything()] can be used in the LHS. Subsequent #' expressions that operate on the columns assigned previously will result in @@ -625,7 +625,7 @@ cols_width <- function( #' `.data`. Two-sided formulas (e.g., ` ~ `) can be used, where the #' left-hand side corresponds to selections of columns and the right-hand side #' evaluates to single-length values for the label to apply. Column names -#' should be enclosed in [c()]. Select helpers like [starts_with()], +#' should be enclosed in `c()`. Select helpers like [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], and [everything()] #' can be used in the LHS. Named arguments are also valid as input for simple #' mappings of column name to label text; they should be of the form `` // *default:* `everything()` #' #' The columns for which the column-labeling operations should be applied. Can -#' either be a series of column names provided in [c()], a vector of column +#' either be a series of column names provided in `c()`, a vector of column #' indices, or a select helper function. Examples of select helper functions #' include [starts_with()], [ends_with()], [contains()], [matches()], #' [one_of()], [num_range()], and [everything()]. @@ -1291,7 +1291,7 @@ cols_label_with <- function( #' `.data`. Two-sided formulas (e.g., ` ~ `) can be used, where the #' left-hand side corresponds to selections of columns and the right-hand side #' evaluates to single-length values for the units to apply. Column names -#' should be enclosed in [c()]. Select helpers like [starts_with()], +#' should be enclosed in `c()`. Select helpers like [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], and [everything()] #' can be used in the LHS. Named arguments are also valid as input for simple #' mappings of column name to the **gt** units syntax; they should be of the @@ -2162,7 +2162,7 @@ cols_add <- function( #' `` // **required** #' #' The columns which contain the numeric data to be plotted as nanoplots. Can -#' either be a series of column names provided in [c()], a vector of column +#' either be a series of column names provided in `c()`, a vector of column #' indices, or a select helper function. Examples of select helper functions #' include [starts_with()], [ends_with()], [contains()], [matches()], #' [one_of()], [num_range()], and [everything()]. Data collected from the @@ -2174,7 +2174,7 @@ cols_add <- function( #' #' With `rows` we can specify which rows should contain nanoplots in the new #' column. The default [everything()] results in all rows in `columns` being -#' formatted. Alternatively, we can supply a vector of row IDs within [c()], a +#' formatted. Alternatively, we can supply a vector of row IDs within `c()`, a #' vector of row indices, or a select helper function. Examples of select #' helper functions include [starts_with()], [ends_with()], [contains()], #' [matches()], [one_of()], [num_range()], and [everything()]. We can also use @@ -2242,7 +2242,7 @@ cols_add <- function( #' We can optionally obtain data for the independent variable (i.e., the #' *x*-axis data) if specifying columns in `columns_x_vals`. This is only for #' the `"line"` type of plot (set via the `plot_type` argument). We can supply -#' either be a series of column names provided in [c()], a vector of column +#' either be a series of column names provided in `c()`, a vector of column #' indices, or a select helper function. Examples of select helper functions #' include [starts_with()], [ends_with()], [contains()], [matches()], #' [one_of()], [num_range()], and [everything()]. Data collected from the @@ -3069,7 +3069,7 @@ generate_data_vals_list <- function( #' `` // **required** #' #' The columns for which the moving operations should be applied. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. The columns move as a group to a @@ -3216,7 +3216,7 @@ cols_move <- function( #' `` // **required** #' #' The columns for which the moving operations should be applied. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. The columns move as a group to the @@ -3339,7 +3339,7 @@ cols_move_to_start <- function( #' `` // **required** #' #' The columns for which the moving operations should be applied. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. The columns move as a group to the @@ -3463,7 +3463,7 @@ cols_move_to_end <- function( #' `` // **required** #' #' The columns to hide in the output display table. Can either be a series of -#' column names provided in [c()], a vector of column indices, or a select +#' column names provided in `c()`, a vector of column indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -3588,7 +3588,7 @@ cols_hide <- function( #' `` // *default:* `everything()` #' #' The columns to unhide in the output display table. Can either be a series -#' of column names provided in [c()], a vector of column indices, or a select +#' of column names provided in `c()`, a vector of column indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -3705,7 +3705,7 @@ cols_unhide <- function( #' The columns for which the merging operations should be applied. The first #' column resolved will be the target column (i.e., undergo mutation) and the #' other columns will serve to provide input. Can either be a series of column -#' names provided in [c()], a vector of column indices, or a select helper +#' names provided in `c()`, a vector of column indices, or a select helper #' function. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. A vector is recommended because in that case we are @@ -3729,7 +3729,7 @@ cols_unhide <- function( #' In conjunction with `columns`, we can specify which of their rows should #' participate in the merging process. The default [everything()] results in #' all rows in `columns` being formatted. Alternatively, we can supply a -#' vector of row IDs within [c()], a vector of row indices, or a select +#' vector of row IDs within `c()`, a vector of row indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -3982,7 +3982,7 @@ cols_merge <- function( #' In conjunction with `columns`, we can specify which of their rows should #' participate in the merging process. The default [everything()] results in #' all rows in `columns` being formatted. Alternatively, we can supply a -#' vector of row IDs within [c()], a vector of row indices, or a select +#' vector of row IDs within `c()`, a vector of row indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -4165,7 +4165,7 @@ cols_merge_uncert <- function( #' In conjunction with `columns`, we can specify which of their rows should #' participate in the merging process. The default [everything()] results in #' all rows in `columns` being formatted. Alternatively, we can supply a -#' vector of row IDs within [c()], a vector of row indices, or a select +#' vector of row IDs within `c()`, a vector of row indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -4410,7 +4410,7 @@ cols_merge_resolver <- function( #' In conjunction with `columns`, we can specify which of their rows should #' participate in the merging process. The default [everything()] results in #' all rows in `columns` being formatted. Alternatively, we can supply a -#' vector of row IDs within [c()], a vector of row indices, or a select +#' vector of row IDs within `c()`, a vector of row indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter diff --git a/R/rows_add.R b/R/rows_add.R index b4819fb0f8..2c3db05382 100644 --- a/R/rows_add.R +++ b/R/rows_add.R @@ -51,7 +51,7 @@ #' exists in the table. Two-sided formulas with column-resolving expressions #' (e.g, ` ~ `) can also be used, where the left-hand side #' corresponds to selections of columns. Column names should be enclosed in -#' [c()] and select helpers like [starts_with()], [ends_with()], [contains()], +#' `c()` and select helpers like [starts_with()], [ends_with()], [contains()], #' [matches()], [one_of()], and [everything()] can be used in the LHS. The #' length of the longest vector in `` determines how many new #' rows will be added. Single values in `` will be repeated down diff --git a/R/substitution.R b/R/substitution.R index 7b3f8ed10a..0cd3bea44d 100644 --- a/R/substitution.R +++ b/R/substitution.R @@ -38,7 +38,7 @@ #' `` // *default:* `everything()` #' #' The columns to which substitution operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -50,7 +50,7 @@ #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -243,7 +243,7 @@ fmt_missing <- function( #' `` // *default:* `everything()` #' #' The columns to which substitution operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -255,7 +255,7 @@ fmt_missing <- function( #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -402,7 +402,7 @@ sub_zero <- function( #' `` // *default:* `everything()` #' #' The columns to which substitution operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -414,7 +414,7 @@ sub_zero <- function( #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -677,7 +677,7 @@ sub_small_vals <- function( #' `` // *default:* `everything()` #' #' The columns to which substitution operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -689,7 +689,7 @@ sub_small_vals <- function( #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter @@ -963,7 +963,7 @@ check_sub_fn_sign <- function(sign, call = rlang::caller_env()) { #' `` // *default:* `everything()` #' #' The columns to which substitution operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. @@ -975,7 +975,7 @@ check_sub_fn_sign <- function(sign, call = rlang::caller_env()) { #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter diff --git a/R/summary_rows.R b/R/summary_rows.R index 7e6642ff6d..32eeb93f66 100644 --- a/R/summary_rows.R +++ b/R/summary_rows.R @@ -39,7 +39,7 @@ #' `` // *default:* `everything()` #' #' The row groups to which targeting operations are constrained. Can either be -#' a series of row group ID values provided in [c()] or a select helper +#' a series of row group ID values provided in `c()` or a select helper #' function. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. By default this is set to [everything()], which means that @@ -50,7 +50,7 @@ #' `` // *default:* `everything()` #' #' The columns for which the summaries should be calculated. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. diff --git a/R/tab_create_modify.R b/R/tab_create_modify.R index 9c5a4eb937..de6c9f6624 100644 --- a/R/tab_create_modify.R +++ b/R/tab_create_modify.R @@ -242,7 +242,7 @@ tab_header <- function( #' `` // *default:* `NULL` (`optional`) #' #' The columns to serve as components of the spanner. Can either be a series -#' of column names provided in [c()], a vector of column indices, or a select +#' of column names provided in `c()`, a vector of column indices, or a select #' helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. This argument works in tandem with the @@ -886,7 +886,7 @@ resolve_spanned_column_names <- function( #' `` // *default:* `everything()` #' #' The columns to consider for the splitting, relabeling, and spanner setting -#' operations. Can either be a series of column names provided in [c()], a +#' operations. Can either be a series of column names provided in `c()`, a #' vector of column indices, or a select helper function. Examples of select #' helper functions include [starts_with()], [ends_with()], [contains()], #' [matches()], [one_of()], [num_range()], and [everything()]. @@ -1461,7 +1461,7 @@ str_split_across <- function( #' `` // **required** #' #' The rows to be made components of the row group. We can supply a vector of -#' row ID values within [c()], a vector of row indices, or use select helpers +#' row ID values within `c()`, a vector of row indices, or use select helpers #' here. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. We can also use expressions to filter down to the rows we @@ -1899,7 +1899,7 @@ tab_stubhead <- function( #' `` // **required** #' #' The rows to consider for the indentation change. We can supply a vector of -#' row ID values within [c()], a vector of row indices, or use select helpers +#' row ID values within `c()`, a vector of row indices, or use select helpers #' here. Examples of select helper functions include [starts_with()], #' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and #' [everything()]. We can also use expressions to filter down to the rows we diff --git a/R/tab_style_body.R b/R/tab_style_body.R index 333d9ae83b..db38cc5684 100644 --- a/R/tab_style_body.R +++ b/R/tab_style_body.R @@ -40,7 +40,7 @@ #' `` // *default:* `everything()` #' #' The columns to which the targeting operations are constrained. Can either -#' be a series of column names provided in [c()], a vector of column indices, +#' be a series of column names provided in `c()`, a vector of column indices, #' or a select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. This argument works in tandem with the @@ -53,7 +53,7 @@ #' In conjunction with `columns`, we can specify which of their rows should #' form a constraint for targeting operations. The default [everything()] #' results in all rows in `columns` being formatted. Alternatively, we can -#' supply a vector of row IDs within [c()], a vector of row indices, or a +#' supply a vector of row IDs within `c()`, a vector of row indices, or a #' select helper function. Examples of select helper functions include #' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()], #' [num_range()], and [everything()]. We can also use expressions to filter diff --git a/man/cells_body.Rd b/man/cells_body.Rd index 9149d2debb..6e44b5292c 100644 --- a/man/cells_body.Rd +++ b/man/cells_body.Rd @@ -12,7 +12,7 @@ cells_body(columns = everything(), rows = everything()) \verb{} // \emph{default:} \code{everything()} The columns to which targeting operations are constrained. Can either -be a series of column names provided in \code{\link[=c]{c()}}, a vector of column indices, +be a series of column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} @@ -24,7 +24,7 @@ or a select helper function. Examples of select helper functions include In conjunction with \code{columns}, we can specify which of their rows should form a constraint for targeting operations. The default \code{\link[=everything]{everything()}} results in all rows in \code{columns} being formatted. Alternatively, we can -supply a vector of row IDs within \code{\link[=c]{c()}}, a vector of row indices, or a +supply a vector of row IDs within \code{c()}, a vector of row indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. We can also use expressions to filter diff --git a/man/cells_column_labels.Rd b/man/cells_column_labels.Rd index b63501720c..f8e9675766 100644 --- a/man/cells_column_labels.Rd +++ b/man/cells_column_labels.Rd @@ -12,7 +12,7 @@ cells_column_labels(columns = everything()) \verb{} // \emph{default:} \code{everything()} The columns to which targeting operations are constrained. Can either -be a series of column names provided in \code{\link[=c]{c()}}, a vector of column indices, +be a series of column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} diff --git a/man/cells_column_spanners.Rd b/man/cells_column_spanners.Rd index e394697ee8..ec968f187d 100644 --- a/man/cells_column_spanners.Rd +++ b/man/cells_column_spanners.Rd @@ -12,7 +12,7 @@ cells_column_spanners(spanners = everything()) \verb{} // \emph{default:} \code{everything()} The spanners to which targeting operations are constrained. Can either be a -series of spanner ID values provided in \code{\link[=c]{c()}} or a select helper function. +series of spanner ID values provided in \code{c()} or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} } diff --git a/man/cells_grand_summary.Rd b/man/cells_grand_summary.Rd index 72d55c744f..d2fea814c9 100644 --- a/man/cells_grand_summary.Rd +++ b/man/cells_grand_summary.Rd @@ -12,7 +12,7 @@ cells_grand_summary(columns = everything(), rows = everything()) \verb{} // \emph{default:} \code{everything()} The columns to which targeting operations are constrained. Can either -be a series of column names provided in \code{\link[=c]{c()}}, a vector of column indices, +be a series of column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} @@ -24,7 +24,7 @@ or a select helper function. Examples of select helper functions include In conjunction with \code{columns}, we can specify which of their rows should form a constraint for targeting operations. The default \code{\link[=everything]{everything()}} results in all rows in \code{columns} being formatted. Alternatively, we can -supply a vector of row IDs within \code{\link[=c]{c()}}, a vector of row indices, or a +supply a vector of row IDs within \code{c()}, a vector of row indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. We can also use expressions to filter diff --git a/man/cells_group.Rd b/man/cells_group.Rd index 1c1b02f3d4..1e20e4b31d 100644 --- a/man/cells_group.Rd +++ b/man/cells_group.Rd @@ -12,7 +12,7 @@ cells_group(groups = everything()) \verb{} // \emph{default:} \code{everything()} The row groups to which targeting operations are constrained. Can either be -a series of row group ID values provided in \code{\link[=c]{c()}} or a select helper +a series of row group ID values provided in \code{c()} or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} diff --git a/man/cells_row_groups.Rd b/man/cells_row_groups.Rd index 9b247c8d55..46eda7cbd9 100644 --- a/man/cells_row_groups.Rd +++ b/man/cells_row_groups.Rd @@ -12,7 +12,7 @@ cells_row_groups(groups = everything()) \verb{} // \emph{default:} \code{everything()} The row groups to which targeting operations are constrained. Can either be -a series of row group ID values provided in \code{\link[=c]{c()}} or a select helper +a series of row group ID values provided in \code{c()} or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} diff --git a/man/cells_stub.Rd b/man/cells_stub.Rd index d31283529b..7753feebdc 100644 --- a/man/cells_stub.Rd +++ b/man/cells_stub.Rd @@ -13,7 +13,7 @@ cells_stub(rows = everything()) The rows to which targeting operations are constrained. The default \code{\link[=everything]{everything()}} results in all rows in \code{columns} being formatted. -Alternatively, we can supply a vector of row IDs within \code{\link[=c]{c()}}, a vector of +Alternatively, we can supply a vector of row IDs within \code{c()}, a vector of row indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. We can also use diff --git a/man/cells_stub_grand_summary.Rd b/man/cells_stub_grand_summary.Rd index 44f969d51e..a89465f138 100644 --- a/man/cells_stub_grand_summary.Rd +++ b/man/cells_stub_grand_summary.Rd @@ -13,7 +13,7 @@ cells_stub_grand_summary(rows = everything()) We can specify which rows should be targeted. The default \code{\link[=everything]{everything()}} results in all rows in \code{columns} being formatted. Alternatively, we can -supply a vector of row IDs within \code{\link[=c]{c()}}, a vector of row indices, or a +supply a vector of row IDs within \code{c()}, a vector of row indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. We can also use expressions to filter diff --git a/man/cells_stub_summary.Rd b/man/cells_stub_summary.Rd index 8280a2eec5..c94f337435 100644 --- a/man/cells_stub_summary.Rd +++ b/man/cells_stub_summary.Rd @@ -12,7 +12,7 @@ cells_stub_summary(groups = everything(), rows = everything()) \verb{} // \emph{default:} \code{everything()} The row groups to which targeting operations are constrained. Can either be -a series of row group ID values provided in \code{\link[=c]{c()}} or a select helper +a series of row group ID values provided in \code{c()} or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} @@ -24,7 +24,7 @@ function. Examples of select helper functions include \code{\link[=starts_with]{ In conjunction with \code{groups}, we can specify which of their rows should form a constraint for targeting operations. The default \code{\link[=everything]{everything()}} results in all rows in \code{columns} being formatted. Alternatively, we can -supply a vector of row IDs within \code{\link[=c]{c()}}, a vector of row indices, or a +supply a vector of row IDs within \code{c()}, a vector of row indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. We can also use expressions to filter diff --git a/man/cells_summary.Rd b/man/cells_summary.Rd index 0f94e7ac80..e1793422d2 100644 --- a/man/cells_summary.Rd +++ b/man/cells_summary.Rd @@ -17,7 +17,7 @@ cells_summary( The row groups to which targeting operations are constrained. This aids in targeting the summary rows that reside in certain row groups. Can either be -a series of row group ID values provided in \code{\link[=c]{c()}} or a select helper +a series of row group ID values provided in \code{c()} or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} @@ -27,7 +27,7 @@ function. Examples of select helper functions include \code{\link[=starts_with]{ \verb{} // \emph{default:} \code{everything()} The columns to which targeting operations are constrained. Can either -be a series of column names provided in \code{\link[=c]{c()}}, a vector of column indices, +be a series of column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} @@ -39,7 +39,7 @@ or a select helper function. Examples of select helper functions include In conjunction with \code{columns}, we can specify which of their rows should form a constraint for targeting operations. The default \code{\link[=everything]{everything()}} results in all rows in \code{columns} being formatted. Alternatively, we can -supply a vector of row IDs within \code{\link[=c]{c()}}, a vector of row indices, or a +supply a vector of row IDs within \code{c()}, a vector of row indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. We can also use expressions to filter diff --git a/man/cols_align.Rd b/man/cols_align.Rd index b68f68af31..e834fe006f 100644 --- a/man/cols_align.Rd +++ b/man/cols_align.Rd @@ -32,7 +32,7 @@ Details section for specifics on which alignments are applied).} \verb{} // \emph{default:} \code{everything()} The columns for which the alignment should be applied. Can either be a -series of column names provided in \code{\link[=c]{c()}}, a vector of column indices, or a +series of column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. By default this is set to \code{\link[=everything]{everything()}} diff --git a/man/cols_align_decimal.Rd b/man/cols_align_decimal.Rd index 2a29f57ef3..b1b03eb300 100644 --- a/man/cols_align_decimal.Rd +++ b/man/cols_align_decimal.Rd @@ -19,7 +19,7 @@ This is the \strong{gt} table object that is commonly created through use of the \verb{} // \emph{default:} \code{everything()} The columns for which decimal alignment should be applied. Can either be a -series of column names provided in \code{\link[=c]{c()}}, a vector of column indices, or a +series of column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}. By default this is set to \code{\link[=everything]{everything()}} diff --git a/man/cols_hide.Rd b/man/cols_hide.Rd index 1b9c2ff5f6..e12ef8b232 100644 --- a/man/cols_hide.Rd +++ b/man/cols_hide.Rd @@ -19,7 +19,7 @@ This is the \strong{gt} table object that is commonly created through use of the \verb{} // \strong{required} The columns to hide in the output display table. Can either be a series of -column names provided in \code{\link[=c]{c()}}, a vector of column indices, or a select +column names provided in \code{c()}, a vector of column indices, or a select helper function. Examples of select helper functions include \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, \code{\link[=num_range]{num_range()}}, and \code{\link[=everything]{everything()}}.} diff --git a/man/cols_label.Rd b/man/cols_label.Rd index 6e8caebaa7..ffc222c6f1 100644 --- a/man/cols_label.Rd +++ b/man/cols_label.Rd @@ -22,7 +22,7 @@ Expressions for the assignment of column labels for the table columns in \code{.data}. Two-sided formulas (e.g., \verb{ ~ }) can be used, where the left-hand side corresponds to selections of columns and the right-hand side evaluates to single-length values for the label to apply. Column names -should be enclosed in \code{\link[=c]{c()}}. Select helpers like \code{\link[=starts_with]{starts_with()}}, +should be enclosed in \code{c()}. Select helpers like \code{\link[=starts_with]{starts_with()}}, \code{\link[=ends_with]{ends_with()}}, \code{\link[=contains]{contains()}}, \code{\link[=matches]{matches()}}, \code{\link[=one_of]{one_of()}}, and \code{\link[=everything]{everything()}} can be used in the LHS. Named arguments are also valid as input for simple mappings of column name to label text; they should be of the form \verb{ =