Description Usage Arguments Value Examples
A friendly function to simplify the validation of function or method input parameters.
validate_parameter
The original function name.
vp
A shortcut function alias.
1 2 3 4 5 6 7 | validate_parameter(parameter_value, default_value = NULL, category = NULL,
parameter_length = NULL, acceptable_values = NULL, limit_min = NULL,
limit_max = NULL, verbosity = NULL, ...)
vp(parameter_value, default_value = NULL, category = NULL,
parameter_length = NULL, acceptable_values = NULL, limit_min = NULL,
limit_max = NULL, verbosity = NULL, ...)
|
parameter_value |
The original function or method parameter. |
default_value |
A default value to be substituted if |
category |
One of the following strings: |
parameter_length |
Often, parameters are received as vectors. Often, functions and methods only support vectors of size 1 or sometimes of a very specific length. |
acceptable_values |
A list of of acceptable values. Any attempt to use a value not listed will raise an error. This is obvious, but note that |
The validated (sometimes coerced) parameter, possibly the default value. Sometimes, accompanied with warnings. If not coerction is possible, raises an error.
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.