check_input_class | R Documentation |
This function checks that the class of an input to a parent function is appropriate. If not, the function either produces a helpful error message or returns a warning.
check_input_class(
arg,
input,
if_class = NULL,
to_class,
type = "stop",
coerce_input
)
arg |
A character string which defines the argument of the parent function. |
input |
The input to an argument of a parent function. |
if_class |
(optional) A character vector of classes of object. If supplied, the function will only proceed to check the class of the object if the |
to_class |
The required class of the input. |
type |
A character which specifies whether to return an error ( |
coerce_input |
A function used to coerce |
The function checks the class of the input. If the class is not the same as required by the parent function (i.e., as specified by class
), the function returns a helpful error message, or a warning and an object whose class has been coerced to the correct class.
Edward Lavender
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.