Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export is.waive() for extensions to use #6173

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@ export(is.scale)
export(is.stat)
export(is.theme)
export(is.theme_element)
export(is.waive)
export(label_both)
export(label_bquote)
export(label_context)
Expand Down
6 changes: 5 additions & 1 deletion R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,16 @@ should_stop <- function(expr) {
#' A waiver is a "flag" object, similar to `NULL`, that indicates the
#' calling function should just use the default value. It is used in certain
#' functions to distinguish between displaying nothing (`NULL`) and
#' displaying a default value calculated elsewhere (`waiver()`)
#' displaying a default value calculated elsewhere (`waiver()`).
#' `is.waive()` reports whether an object is a waiver.
#'
#' @export
#' @keywords internal
waiver <- function() structure(list(), class = "waiver")

#' @param x An object to test
#' @export
#' @rdname waiver
is.waive <- function(x) inherits(x, "waiver")

pal_binned <- function(palette) {
Expand Down
9 changes: 8 additions & 1 deletion man/waiver.Rd

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

Loading