waiver {ggdist}R Documentation

A waived argument

Description

A flag indicating that the default value of an argument should be used.

Usage

waiver()

Details

A waiver() is a flag passed to a function argument that indicates the function should use the default value of that argument. It is used in two cases:

See Also

auto_partial(), ggplot2::waiver()

Examples

f = auto_partial(function(x, y = "b") {
  c(x = x, y = y)
})

f("a")

# uses the default value of `y` ("b")
f("a", y = waiver())

# partially apply `f`
g = f(y = "c")
g

# uses the last partially-applied value of `y` ("c")
g("a", y = waiver())

[Package ggdist version 3.3.3 Index]