From 02416318ab5b7669bdac600f2ec748bd4057655d Mon Sep 17 00:00:00 2001 From: Parker Date: Fri, 15 Nov 2024 22:33:36 +0000 Subject: [PATCH] Fix documentation for GIGS package-level options --- R/gigs_options.R | 5 +++-- man/gigs_options.Rd | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/R/gigs_options.R b/R/gigs_options.R index f82fdd2..d0d246e 100644 --- a/R/gigs_options.R +++ b/R/gigs_options.R @@ -31,11 +31,12 @@ #' #' This argument will not accept an integer in place of a logical value. #' @param new_value A single case-sensitive character variable. For all options -#' **except** "handle_unused_levels", this should be one of: +#' **except** `"handle_unused_levels"`, this should be one of: #' * `"quiet"` - gigs will replace invalid vector elements with `NA` quietly. #' * `"warn"` - gigs will replace invalid vector elements with `NA` loudly. #' * `"error"` - gigs will throw informative errors if any invalid inputs are #' encountered. +#' #' For "handle_unused_levels", `new_value` should be one of: #' * `"keep_quiet"` - Keep unused factor levels, and don't issue a warning. #' * `"keep_warn"` - Keep unused factor levels, whilst issuing a warning. @@ -43,7 +44,7 @@ #' * `"drop_warn"` - Drop unused factor levels, whilst issuing a warning. #' #' By default, GIGS options are `"warn"` for input handling and `"keep_warn"` -#' for `"handle_unused_levels"` +#' for `"handle_unused_levels"`. #' @returns A single-length character vector. For `gigs_option_get()`, the #' current value of `option`; for `gigs_option_get()`, the new value of #' `option`; for `gigs_input_options_set()`, `new_value`. If `silent = FALSE` diff --git a/man/gigs_options.Rd b/man/gigs_options.Rd index aaf1f54..c303cad 100644 --- a/man/gigs_options.Rd +++ b/man/gigs_options.Rd @@ -40,13 +40,16 @@ printed to the console describing either: This argument will not accept an integer in place of a logical value.} \item{new_value}{A single case-sensitive character variable. For all options -\strong{except} "handle_unused_levels", this should be one of: +\strong{except} \code{"handle_unused_levels"}, this should be one of: \itemize{ \item \code{"quiet"} - gigs will replace invalid vector elements with \code{NA} quietly. \item \code{"warn"} - gigs will replace invalid vector elements with \code{NA} loudly. \item \code{"error"} - gigs will throw informative errors if any invalid inputs are encountered. +} + For "handle_unused_levels", \code{new_value} should be one of: +\itemize{ \item \code{"keep_quiet"} - Keep unused factor levels, and don't issue a warning. \item \code{"keep_warn"} - Keep unused factor levels, whilst issuing a warning. \item \code{"drop_quiet"} - Drop unused factor levels, and don't issue a warning. @@ -54,7 +57,7 @@ For "handle_unused_levels", \code{new_value} should be one of: } By default, GIGS options are \code{"warn"} for input handling and \code{"keep_warn"} -for \code{"handle_unused_levels"}} +for \code{"handle_unused_levels"}.} } \value{ A single-length character vector. For \code{gigs_option_get()}, the