chk_pars | R Documentation |
Checks if valid parameter names.
chk_pars(x, x_name = NULL)
vld_pars(x)
x |
An object. |
x_name |
A string of the name of object x or NULL. |
The character vector must consist of values that start with an alpha and only include alphanumeric characters and '_' or '.'.
Missing values and duplicates are permitted.
The chk_
function throws an informative error if the test fails.
The vld_
function returns a flag indicating whether the test was met.
vld_pars()
: Validate Parameter Names
x <- c("x", "a1._", "X")
chk_pars(x)
y <- c("x[1]", "a1", "a1", "._0")
try(chk_pars(y))
vld_pars(c("x", "a1._", "X"))
vld_pars(c("x[1]", "a1", "a1", "._0"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.