diff --git a/R/teal_slice.R b/R/teal_slice.R index 84afe167d..e87682b66 100644 --- a/R/teal_slice.R +++ b/R/teal_slice.R @@ -2,6 +2,38 @@ #' #' Create a `teal_slice` object that holds complete information on filtering one variable. #' +# Custom @usage section is needed to that utility functions are listed in the usage and they do not have index entries. +#' @usage +#' teal_slice( +#' dataname, +#' varname, +#' id, +#' expr, +#' choices = NULL, +#' selected = NULL, +#' keep_na = NULL, +#' keep_inf = NULL, +#' fixed = FALSE, +#' anchored = FALSE, +#' multiple = TRUE, +#' title = NULL, +#' ... +#' ) +#' +#' is.teal_slice(x) +#' +#' as.teal_slice(x) +#' +#' ## S3 method for class 'teal_slice' +#' as.list.teal_slice(x, ...) +#' +#' ## S3 method for class 'teal_slice' +#' format.teal_slice(x, show_all = FALSE, trim_lines = TRUE, ...) +#' +#' ## S3 method for class 'teal_slice' +#' print.teal_slice(x, ...) +#' +#' @details #' `teal_slice` object fully describes filter state and can be used to create, #' modify, and delete a filter state. A `teal_slice` contains a number of common fields #' (all named arguments of `teal_slice`), some of which are mandatory, but only @@ -110,37 +142,6 @@ #' #' @seealso [`teal_slices`] #' -# Custom @usage section is needed to that utility functions are listed in the usage and they do not have index entries. -#' @usage -#' teal_slice( -#' dataname, -#' varname, -#' id, -#' expr, -#' choices = NULL, -#' selected = NULL, -#' keep_na = NULL, -#' keep_inf = NULL, -#' fixed = FALSE, -#' anchored = FALSE, -#' multiple = TRUE, -#' title = NULL, -#' ... -#' ) -#' -#' is.teal_slice(x) -#' -#' as.teal_slice(x) -#' -#' ## S3 method for class 'teal_slice' -#' as.list.teal_slice(x, ...) -#' -#' ## S3 method for class 'teal_slice' -#' format.teal_slice(x, show_all = FALSE, trim_lines = TRUE, ...) -#' -#' ## S3 method for class 'teal_slice' -#' print.teal_slice(x, ...) -#' #' @export teal_slice <- function(dataname, # When editing function parameters, please remember to update @usage section. varname, diff --git a/R/teal_slices.R b/R/teal_slices.R index 44d06655a..ebfc344a2 100644 --- a/R/teal_slices.R +++ b/R/teal_slices.R @@ -2,6 +2,36 @@ #' #' Create `teal_slices` object to package multiple filters and additional settings. #' +# Custom @usage section is needed to that utility functions are listed in the usage and they do not have index entries. +#' @usage +#' teal_slices( +#' ..., +#' exclude_varnames = NULL, +#' include_varnames = NULL, +#' count_type = NULL, +#' allow_add = TRUE +#' ) +#' +#' is.teal_slices(x) +#' +#' as.teal_slices(x) +#' +#' ## S3 method for class 'teal_slices' +#' as.list(x, recursive = FALSE, ...) +#' +#' ## S3 method for class 'teal_slices' +#' x[i] +#' +#' ## S3 method for class 'teal_slices' +#' c(...) +#' +#' ## S3 method for class 'teal_slices' +#' format(x, show_all = FALSE, trim_lines = TRUE, ...) +#' +#' ## S3 method for class 'teal_slices' +#' print(x, ...) +#' +#' @details #' `teal_slices()` collates multiple `teal_slice` objects into a `teal_slices` object, #' a complete filter specification. This is used by all classes above `FilterState` #' as well as `filter_panel_api` wrapper functions. @@ -88,35 +118,6 @@ #' - [`teal_slice`] for creating constituent elements of `teal_slices` #' - [`teal::slices_store`] for robust utilities for saving and loading `teal_slices` in `JSON` format #' -# Custom @usage section is needed to that utility functions are listed in the usage and they do not have index entries. -#' @usage -#' teal_slices( -#' ..., -#' exclude_varnames = NULL, -#' include_varnames = NULL, -#' count_type = NULL, -#' allow_add = TRUE -#' ) -#' -#' is.teal_slices(x) -#' -#' as.teal_slices(x) -#' -#' ## S3 method for class 'teal_slices' -#' as.list(x, recursive = FALSE, ...) -#' -#' ## S3 method for class 'teal_slices' -#' x[i] -#' -#' ## S3 method for class 'teal_slices' -#' c(...) -#' -#' ## S3 method for class 'teal_slices' -#' format(x, show_all = FALSE, trim_lines = TRUE, ...) -#' -#' ## S3 method for class 'teal_slices' -#' print(x, ...) -#' #' @export #' teal_slices <- function(..., # When editing function parameters, please remember to update @usage section.