| specify_chr | R Documentation |
specify_chr() creates a function that will call stabilize_chr() with the
provided arguments. specify_chr_scalar() creates a function that will call
stabilize_chr_scalar() with the provided arguments. specify_character()
is a synonym of specify_chr(), and specify_character_scalar() is a
synonym of specify_chr_scalar().
specify_chr(
allow_null = TRUE,
allow_na = TRUE,
min_size = NULL,
max_size = NULL,
regex = NULL
)
specify_chr_scalar(
allow_null = FALSE,
allow_zero_length = FALSE,
allow_na = TRUE,
regex = NULL
)
specify_character(
allow_null = TRUE,
allow_na = TRUE,
min_size = NULL,
max_size = NULL,
regex = NULL
)
specify_character_scalar(
allow_null = FALSE,
allow_zero_length = FALSE,
allow_na = TRUE,
regex = NULL
)
allow_null |
|
allow_na |
|
min_size |
|
max_size |
|
regex |
|
allow_zero_length |
|
A function of class "stbl_specified_fn" that calls
stabilize_chr() or stabilize_chr_scalar() with the provided arguments.
The generated function will also accept ... for additional arguments to
pass to stabilize_chr() or stabilize_chr_scalar(). You can copy/paste
the body of the resulting function if you want to provide additional
context or functionality.
Other character functions:
are_chr_ish(),
stabilize_chr()
Other specification functions:
specify_dbl(),
specify_df(),
specify_fct(),
specify_int(),
specify_lgl(),
specify_lst()
stabilize_email <- specify_chr(regex = "^[^@]+@[^@]+\\.[^@]+$")
stabilize_email("stbl@example.com")
try(stabilize_email("not-an-email-address"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.