Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove one_of() from documentation #1721

Merged
merged 6 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions R/data_color.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@
#' `<column-targeting expression>` // *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,
#' or a select helper function. Examples of select helper functions include
#' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()],
#' [num_range()], and [everything()].
#' be a series of column names provided in `c()`, a vector of column indices,
#' or a select helper function (e.g. [starts_with()], [ends_with()],
#' [contains()], [matches()], [num_range()], and [everything()]).
#'
#' @param rows *Rows to target*
#'
Expand All @@ -83,12 +82,11 @@
#' 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
#' 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., `[colname_1] > 100 &
#' [colname_2] < 50`).
#' Alternatively, we can supply a vector of row IDs within `c()`, a vector of
#' row indices, or a select helper function (e.g. [starts_with()],
#' [ends_with()], [contains()], [matches()], [num_range()], and [everything()]).
#' We can also use expressions to filter down to the rows we need
#' (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @param direction *Color computation direction*
#'
Expand Down
9 changes: 4 additions & 5 deletions R/export.R
Original file line number Diff line number Diff line change
Expand Up @@ -1790,11 +1790,10 @@ 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.
#' 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.,
#' `[colname_1] > 100 & [colname_2] < 50`).
#' row IDs within `c()`, a vector of row indices, or a select helper function
#' (e.g. [starts_with()], [ends_with()], [contains()], [matches()],
#' [num_range()], and [everything()]). We can also use expressions to filter
#' down to the rows we need (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @return A vector of cell data extracted from a **gt** table.
#'
Expand Down
16 changes: 7 additions & 9 deletions R/format_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@
#'
#' `<column-targeting expression>` // *default:* `everything()`
#'
#' 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()].
#' Can either be a series of column names provided in `c()`, a vector of
#' column indices, or a select helper function (e.g. [starts_with()],
#' [ends_with()], [contains()], [matches()], [num_range()] and [everything()]).
#'
#' @param rows *Rows to target*
#'
Expand All @@ -66,11 +65,10 @@
#' 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
#' 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., `[colname_1] > 100 & [colname_2] < 50`).
#' captions within `c()`, a vector of row indices, or a select helper
#' function (e.g. [starts_with()], [ends_with()], [contains()], [matches()],
#' [num_range()], and [everything()]). We can also use expressions to filter
#' down to the rows we need (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @param decimals *Number of decimal places*
#'
Expand Down
7 changes: 3 additions & 4 deletions R/gt_split.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,9 @@
#'
#' 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()].
#' names provided in `c()`, a vector of column indices, or a select helper
#' function (e.g. [starts_with()], [ends_with()], [contains()], [matches()],
#' [num_range()], and [everything()]).
#'
#' @return An object of class `gt_group`.
#'
Expand Down
83 changes: 39 additions & 44 deletions R/helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -1339,21 +1339,21 @@ cells_stubhead <- function() {
#'
#' @description
#'
#' `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
#' 'column_spanners' location is generated by one or more uses of the
#' [tab_spanner()] function or the [tab_spanner_delim()] function.
#' `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
#' 'column_spanners' location is generated by one or more uses of
#' [tab_spanner()] or [tab_spanner_delim()].
#'
#' @param spanners *Specification of spanner IDs*
#'
#' `<spanner-targeting expression>` // *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.
#' Examples of select helper functions include [starts_with()], [ends_with()],
#' [contains()], [matches()], [one_of()], [num_range()], and [everything()].
#' series of spanner ID values provided in `c()` or a select helper function
#' (e.g. [starts_with()], [ends_with()], [contains()], [matches()],
#' [num_range()], and [everything()]).
#'
#' @return A list object with the classes `cells_column_spanners` and
#' `location_cells`.
Expand Down Expand Up @@ -1507,10 +1507,9 @@ cells_column_labels <- function(columns = everything()) {
#' `<row-group-targeting expression>` // *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
#' function. Examples of select helper functions include [starts_with()],
#' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and
#' [everything()].
#' a series of row group ID values provided in `c()` or a select helper
#' function (e.g. [starts_with()], [ends_with()], [contains()], [matches()],
#' [num_range()], and [everything()]).
#'
#' @return A list object with the classes `cells_row_groups` and
#' `location_cells`.
Expand Down Expand Up @@ -1614,12 +1613,11 @@ 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
#' 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., `[colname_1] > 100 &
#' [colname_2] < 50`).
#' Alternatively, we can supply a vector of row IDs within `c()`, a vector of
#' row indices, or a select helper function (e.g. [starts_with()],
#' [ends_with()], [contains()], [matches()], [num_range()], and [everything()]).
#' We can also use expressions to filter down to the rows we need
#' (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @return A list object with the classes `cells_stub` and `location_cells`.
#'
Expand Down Expand Up @@ -1689,10 +1687,9 @@ cells_stub <- function(rows = everything()) {
#' `<column-targeting expression>` // *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,
#' or a select helper function. Examples of select helper functions include
#' [starts_with()], [ends_with()], [contains()], [matches()], [one_of()],
#' [num_range()], and [everything()].
#' be a series of column names provided in `c()`, a vector of column indices,
#' or a select helper function (e.g. [starts_with()], [ends_with()],
#' [contains()], [matches()], [num_range()], and [everything()]).
#'
#' @param rows *Rows to target*
#'
Expand All @@ -1701,11 +1698,10 @@ 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
#' 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., `[colname_1] > 100 & [colname_2] < 50`).
#' supply a vector of row IDs within `c()`, a vector of row indices, or a
#' select helper function (e.g. [starts_with()], [ends_with()], [contains()],
#' [matches()], [num_range()], and [everything()]). We can also use expressions to
#' filter down to the rows we need (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @return A list object with the classes `cells_body` and `location_cells`.
#'
Expand Down Expand Up @@ -1804,18 +1800,17 @@ cells_body <- function(
#' functions' `locations` argument. The 'summary' location is generated by
#' [summary_rows()].
#'
#' @inheritParams cells_body
#'
#' @param groups *Specification of row group IDs*
#'
#' `<row-group-targeting expression>` // *default:* `everything()`
#'
#' 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
#' function. Examples of select helper functions include [starts_with()],
#' [ends_with()], [contains()], [matches()], [one_of()], [num_range()], and
#' [everything()].
#'
#' @inheritParams cells_body
#' a series of row group ID values provided in `c()` or a select helper
#' function (e.g. [starts_with()], [ends_with()], [contains()], [matches()],
#' [num_range()], and [everything()].
#'
#' @return A list object with the classes `cells_summary` and `location_cells`.
#'
Expand Down Expand Up @@ -2059,11 +2054,11 @@ 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
#' 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., `[colname_1] > 100 & [colname_2] < 50`).
#' supply a vector of row IDs within `c()`, a vector of row indices, or a
#' select helper function (e.g. [starts_with()], [ends_with()], [contains()],
#' [matches()], [num_range()], and [everything()]). We can also use
#' expressions to filter down to the rows we need
#' (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @return A list object with the classes `cells_stub_summary` and
#' `location_cells`.
Expand Down Expand Up @@ -2174,11 +2169,11 @@ 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
#' 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., `[colname_1] > 100 & [colname_2] < 50`).
#' supply a vector of row IDs within `c()`, a vector of row indices, or a
#' select helper function (e.g. [starts_with()], [ends_with()], [contains()],
#' [matches()], [num_range()] and [everything()]). We can also use expressions
#' to filter down to the rows we need
#' (e.g., `[colname_1] > 100 & [colname_2] < 50`).
#'
#' @return A list object with the classes `cells_stub_grand_summary` and
#' `location_cells`.
Expand Down
Loading
Loading