View source: R/is_non_negative_numeric.R
| is_non_negative_numeric | R Documentation |
This internal function checks whether the input is a non-negative numeric scalar. It can optionally throw an error if the input is invalid.
is_non_negative_numeric(x, name_of_func, throw_error = TRUE)
x |
The input to check. Should be a single numeric value. |
name_of_func |
Name of function to return as error message |
throw_error |
Logical. If |
This function is intended for internal use within the package to validate numeric inputs. It ensures that the input is numeric, has a length of 1, and is greater than 0.
A logical value:
TRUE if x is a non-negative numeric scalar.
FALSE if x is not a non-negative numeric scalar'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.