specify_lgl() creates a function that will call stabilize_lgl() with the
provided arguments. specify_lgl_scalar() creates a function that will call
stabilize_lgl_scalar() with the provided arguments. specify_logical() is
a synonym of specify_lgl(), and specify_logical_scalar() is a synonym of
specify_lgl_scalar().
Usage
specify_lgl(
allow_null = TRUE,
allow_na = TRUE,
min_size = NULL,
max_size = NULL
)
specify_lgl_scalar(
allow_null = FALSE,
allow_zero_length = FALSE,
allow_na = TRUE
)
specify_logical(
allow_null = TRUE,
allow_na = TRUE,
min_size = NULL,
max_size = NULL
)
specify_logical_scalar(
allow_null = FALSE,
allow_zero_length = FALSE,
allow_na = TRUE
)Arguments
- allow_null
(length-1 logical)Is NULL an acceptable value?- allow_na
(length-1 logical)Are NA values ok?- min_size
(length-1 integer)The minimum size of the object. Object size will be tested usingvctrs::vec_size().- max_size
(length-1 integer)The maximum size of the object. Object size will be tested usingvctrs::vec_size().- allow_zero_length
(length-1 logical)Are zero-length vectors acceptable?
Value
A function of class "stbl_specified_fn" that calls
stabilize_lgl() or stabilize_lgl_scalar() with the provided arguments.
The generated function will also accept ... for additional arguments to
pass to stabilize_lgl() or stabilize_lgl_scalar(). You can copy/paste
the body of the resulting function if you want to provide additional
context or functionality.
See also
Other logical functions:
are_lgl_ish(),
stabilize_lgl()
Other specification functions:
specify_chr(),
specify_dbl(),
specify_df(),
specify_fct(),
specify_int(),
specify_lst()