powered by
Cast an optional object to its base type.
opt_unwrap(opt)
The optional variable to cast back
The object wrapped in opt. NULL if opt is none.
opt
NULL
none
Since an optional can be used the same way as its base type, there is no known scenario where this function might be useful.
make_opt(), match_with()
# NOT RUN { a <- option(5) class(a) ## [1] "optional" a <- opt_unwrap(a) class(a) ## [1] "numeric" # }
Run the code above in your browser using DataLab