chk_pars {extras} | R Documentation |
Check Parameter Names
Description
Checks if valid parameter names.
Usage
chk_pars(x, x_name = NULL)
vld_pars(x)
Arguments
x |
An object. |
x_name |
A string of the name of object x or NULL. |
Details
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.
Value
The chk_
function throws an informative error if the test fails.
The vld_
function returns a flag indicating whether the test was met.
Functions
-
vld_pars()
: Validate Parameter Names
Examples
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"))
[Package extras version 0.6.1 Index]