opt_unwrap: Option Unwrap

Description Usage Arguments Details Value See Also Examples

View source: R/optional.R

Description

Cast an optional object to its base type.

Usage

1

Arguments

opt

The optional variable to cast back

Details

Since an optional can be used the same way as its base type, there is no known scenario where this function might be useful.

Value

The object wrapped in opt. NULL if opt is none.

See Also

make_opt(), match_with()

Examples

1
2
3
4
5
6
7
a <- option(5)
class(a)
## [1] "optional"
a <- opt_unwrap(a)

class(a)
## [1] "numeric"

optional documentation built on May 1, 2019, 9:14 p.m.