Skip to content

Commit

Permalink
Merge pull request #1721 from olivroy/one-of
Browse files Browse the repository at this point in the history
Remove `one_of()` from documentation
  • Loading branch information
rich-iannone authored Jun 19, 2024
2 parents 1ed4a2c + 2f996c3 commit 74a3fd3
Show file tree
Hide file tree
Showing 84 changed files with 663 additions and 881 deletions.
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

0 comments on commit 74a3fd3

Please sign in to comment.