Skip to content

Commit

Permalink
docs: improved documentation of assert_scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
selkamand committed Nov 12, 2024
1 parent 232c497 commit 8df1f3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion R/assert_type.R
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ assert_reactive <- assert_create(func = is_reactive, default_error_msg = msg_hel
## Scalar -----------------------------------------------------------
#' Assert input is a scalar
#'
#' Assert that an object is a scalar, meaning it has length 1 (but can be of any type).
#' Assert that an object is a scalar, meaning it is a length 1 atomic vector (such as \code{numeric(1)}, \code{character(1)} or \code{logical(1)}).
#' Note lists, data.frames and matrices are never considered scalar objects, even if they have only one element.
#'
#' @param x An object
#' @param msg A character string containing the error message to display if `x` is not a scalar
Expand Down
3 changes: 2 additions & 1 deletion man/assert_scalar.Rd

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

0 comments on commit 8df1f3b

Please sign in to comment.