check_vector | R Documentation |
Compares the values of an input-vector against a control-vector containing valid values and returns the values of input that were found among the valid ones.
check_vector(
input,
against,
ref.input = "input vector",
ref.against = "valid options",
ref.connect = "among",
fdb.fn = "message",
verbose = TRUE,
with.time = FALSE
)
input |
A vector of any kind. |
against |
A vector of the same kind as |
ref.input |
The reference character value for input. |
ref.against |
The reference character value for against. |
fdb.fn |
Character value. Determines the function to call if a feedback message needs to be given. One of 'stop', 'warning' or 'message'. |
verbose |
Logical. If set to TRUE informative messages regarding the computational progress will be printed. (Warning messages will always be printed.) |
with.time |
Logical value. Indicates whether the current time is to be added to the feedback message. |
... |
Additional arguments given to |
If none of the input values are found an error is raised with the message:
glue::glue("Did not find any element of ref.input
in ref.against
.")
If only some of the input values are found the function denoted in fdb.fn
is called with the message:
glue::glue("Of ref.input
did not find 'missing' in ref.against
.")
An informative error message about which elements of input
were found in against
or an invisible TRUE.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.