check_value | R Documentation |
Within a function, this function checks the value of an input to an argument of that function. If the input value is supported, the function simply returns this value. If the input is not supported, the function returns a warning and the default value. This function is designed to be implemented internally within functions and not intended for general use.
check_value(arg = deparse(substitute(input)), input, supp, default = supp[1])
arg |
A character string which defines the argument of the parent function. |
input |
The input to an argument of a parent function. |
supp |
A vector of supported input values for the argument in the parent function. |
default |
The default input value for the parent function. |
The function returns input
or default
(the latter with a warning) depending on whether or not input
is within supp
(i.e., whether or not the input to the argument of a parent function is supported).
Edward Lavender
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.