View source: R/stabilize_present.R
| stabilize_present | R Documentation |
stabilize_present() validates that a value is not NULL. Any non-NULL
value passes through unchanged. This is useful as an element specification
in stabilize_lst() when you need to require a named element without
imposing any type constraints on its value.
stabilize_present(
x,
x_arg = caller_arg(x),
call = caller_env(),
x_class = object_type(x)
)
x |
The argument to stabilize. |
x_arg |
|
call |
|
x_class |
|
The value, unchanged.
Other list functions:
specify_lst(),
stabilize_lst(),
to_lst()
Other stabilization functions:
stabilize_arg(),
stabilize_chr(),
stabilize_dbl(),
stabilize_df(),
stabilize_fct(),
stabilize_int(),
stabilize_lgl(),
stabilize_lst()
stabilize_present("any value")
stabilize_present(list(1, 2, 3))
try(stabilize_present(NULL))
# Use as a named element spec in stabilize_lst()
stabilize_lst(list(data = mtcars), data = stabilize_present)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.