Skip to content

Commit deccf1f

Browse files
committed
Export is.waive()
1 parent b29b831 commit deccf1f

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ export(is.scale)
475475
export(is.stat)
476476
export(is.theme)
477477
export(is.theme_element)
478+
export(is.waive)
478479
export(label_both)
479480
export(label_bquote)
480481
export(label_context)

R/utilities.R

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,16 @@ should_stop <- function(expr) {
182182
#' A waiver is a "flag" object, similar to `NULL`, that indicates the
183183
#' calling function should just use the default value. It is used in certain
184184
#' functions to distinguish between displaying nothing (`NULL`) and
185-
#' displaying a default value calculated elsewhere (`waiver()`)
185+
#' displaying a default value calculated elsewhere (`waiver()`).
186+
#' `is.waive()` reports whether an object is a waiver.
186187
#'
187188
#' @export
188189
#' @keywords internal
189190
waiver <- function() structure(list(), class = "waiver")
190191

192+
#' @param x An object to test
193+
#' @export
194+
#' @rdname waiver
191195
is.waive <- function(x) inherits(x, "waiver")
192196

193197
pal_binned <- function(palette) {

man/waiver.Rd

Lines changed: 8 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)