Skip to content

Commit

Permalink
52 standardise optional notation (#204)
Browse files Browse the repository at this point in the history
part of insightsengineering/nestdevs-tasks#52

---------

Signed-off-by: kartikeya kirar <[email protected]>
Co-authored-by: Marcin <[email protected]>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 14, 2024
1 parent 3843e16 commit d0e573e
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 36 deletions.
10 changes: 5 additions & 5 deletions R/call_utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ call_condition_range_date <- function(varname, range) {
#' Get call to subset and select array
#'
#' @param dataname (`character(1)` or `name`).
#' @param row (optional `name` or `call` or `logical` or `integer` or `character`)
#' @param row (`name` or `call` or `logical` or `integer` or `character`) optional
#' name of the `row` or condition.
#' @param column (optional `name` or `call` or `logical`, `integer` or `character`)
#' @param column (`name` or `call` or `logical` or `integer` or `character`) optional
#' name of the `column` or condition.
#' @param aisle (optional `name` or `call` or `logical` or `integer` or `character`)
#' @param aisle (`name` or `call` or `logical` or `integer` or `character`) optional
#' name of the `row` or condition.
#'
#' @return [Extract()] `call` for 3-dimensional array in `x[i, j, k]` notation.
Expand Down Expand Up @@ -251,9 +251,9 @@ call_extract_array <- function(dataname = ".", row = NULL, column = NULL, aisle
#' Get call to subset and select matrix
#'
#' @param dataname (`character(1)` or `name`).
#' @param row (optional `name` or `call` or `logical` or `integer` or `character`)
#' @param row (`name` or `call` or `logical` or `integer` or `character`) optional
#' name of the `row` or condition.
#' @param column (optional `name` or `call` or `logical` or `integer` or `character`)
#' @param column (`name` or `call` or `logical` or `integer` or `character`) optional
#' name of the `column` or condition.
#'
#' @return [Extract()] `call` for matrix in `x[i, j]` notation.
Expand Down
2 changes: 1 addition & 1 deletion R/choices_selected.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ no_select_keyword <- "-- no selection --"
#' `choices` is a vector, or `NULL` if `choices` is a `delayed_data` object.
#' @param keep_order (`logical`) In case of `FALSE` the selected variables will
#' be on top of the drop-down field.
#' @param fixed (optional `logical`) Whether to block user to select choices.
#' @param fixed (`logical`) optional, whether to block user to select choices.
#'
#' @return `choices_selected` returns list of `choices_selected`, encapsulating the specified
#' `choices`, `selected`, `keep_order` and `fixed`.
Expand Down
4 changes: 2 additions & 2 deletions R/filter_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
#' (default values).
#' This value will be displayed inside the shiny app upon start.
#' The `all_choices` object indicates selecting all possible choices.
#' @param drop_keys (optional `logical`) whether to drop filter column from the
#' @param drop_keys (`logical`) optional, whether to drop filter column from the
#' dataset keys, `TRUE` on default.
#' @param label (optional `character`). Define a label on top of this specific
#' @param label (`character`) optional, defines a label on top of this specific
#' shiny [shiny::selectInput()]. The default value is `"Filter by"`.
#'
#' @return `filter_spec`-S3-class object or `delayed_filter_spec`-S3-class object.
Expand Down
2 changes: 1 addition & 1 deletion R/get_dplyr_call.R
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ get_dplyr_call_data <- function(selector_list, join_keys = teal.data::join_keys(
#'
#' @inheritParams get_dplyr_call_data
#'
#' @param idx optional (`integer`) current selector index in all selectors list.
#' @param idx (`integer`) optional, current selector index in all selectors list.
#' @param dplyr_call_data (`list`) simplified selectors with aggregated set of filters,
#' selections, reshapes etc. All necessary data for merging.
#' @param data (`NULL` or named `list`) of datasets.
Expand Down
4 changes: 2 additions & 2 deletions R/get_merge_call.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ get_merge_key_pair <- function(selector_from, selector_to, key_from) {
#' Gets keys needed for join call of two selectors
#'
#' @inheritParams get_merge_call
#' @param idx (optional `integer`) current selector index in all selectors list.
#' @param idx (`integer`) optional, current selector index in all selectors list.
#'
#' @return `character` list of keys.
#'
Expand Down Expand Up @@ -294,7 +294,7 @@ get_merge_key_i <- function(selector_list, idx, dplyr_call_data = get_dplyr_call
#'
#' @inheritParams get_merge_call
#' @param merge_key keys obtained from `get_merge_key_i`.
#' @param idx optional (`integer`) current selector index in all selectors list.
#' @param idx (`integer`) optional, current selector index in all selectors list.
#'
#' @return `call` with merge keys.
#'
Expand Down
8 changes: 4 additions & 4 deletions R/select_spec.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
#' These have to be columns in the dataset defined in the [data_extract_spec()]
#' where this is called.
#' `delayed_data` objects can be created via [variable_choices()] or [value_choices()].
#' @param selected (optional `character` or `NULL` or `all_choices` or `delayed_data`).
#' Named character vector to define the selected values of a shiny [shiny::selectInput()].
#' @param selected (`character` or `NULL` or `all_choices` or `delayed_data`) optional
#' named character vector to define the selected values of a shiny [shiny::selectInput()].
#' Passing an `all_choices()` object indicates selecting all possible choices.
#' Defaults to the first value of `choices` or `NULL` for delayed data loading.
#' @param multiple (`logical`) Whether multiple values shall be allowed in the
#' shiny [shiny::selectInput()].
#' @param fixed (optional `logical`). [data_extract_spec()] specific feature to
#' @param fixed (`logical`) optional [data_extract_spec()] specific feature to
#' hide the choices selected in case they are not needed. Setting fixed to `TRUE`
#' will not allow the user to select columns. It will then lead to a selection of
#' columns in the dataset that is defined by the developer of the app.
#' @param always_selected (`character`) Additional column names from the data set that should
#' always be selected
#' @param ordered (`logical(1)`) Flags whether selection order should be tracked.
#' @param label (optional `character`). Define a label on top of this specific
#' @param label (`character`) optional, defines a label on top of this specific
#' shiny [shiny::selectInput()]. The default value is `"Select"`.
#'
#' @return A `select_spec`-S3 class object or `delayed_select_spec`-S3-class object.
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ split_by_sep <- function(x, sep) {
#' Extract labels from choices basing on attributes and names
#'
#' @param choices (`list` or `vector`) select choices.
#' @param values (optional `list` or `vector`) with subset of `choices` for which
#' @param values (`list` or `vector`) optional, with subset of `choices` for which
#' labels should be extracted, `NULL` for all choices.
#'
#' @return `character` vector with labels.
Expand Down
6 changes: 3 additions & 3 deletions man/call_extract_array.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/call_extract_matrix.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/choices_selected.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/extract_choices_labels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/filter_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/filter_spec_internal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_dplyr_call.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_merge_key_i.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_rename_call.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/get_reshape_call.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/parse_merge_key_i.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions man/select_spec.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d0e573e

Please sign in to comment.