Description Usage Arguments Value Examples
These functions are for checking that arguments of parent functions are as expected.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | norm_type_or_null(
x,
type,
length = 1,
allow_NAs = FALSE,
arg = deparse(substitute(x))
)
norm_type(x, type, length = 1, allow_NAs = FALSE, arg = deparse(substitute(x)))
## S4 method for signature 'ANY,numeric'
norm_type(x, type, length = 1, allow_NAs = FALSE, arg = deparse(substitute(x)))
## S4 method for signature 'ANY,integer'
norm_type(x, type, length = 1, allow_NAs = FALSE, arg = deparse(substitute(x)))
|
x |
An argument to check. |
type |
A vector of the expected type, typically of length 0. |
length |
An |
allow_NAs |
A |
arg |
A |
It returns x
if it satisfies the criteria, or x
coerced to the
type
class when appropriate.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.