Check Argument Types, Length or Dimension
Check Argument Types, Length or Dimension
check_args(arg, type, length = NULL, dim = NULL)
arg |
An argument to be checked. |
type |
A character vector of candidate argument type. |
length |
A numeric value of argument length or NULL |
dim |
A numeric vector of argument dimension or NULL. |
if type, length or dim is NULL, the corresponding check will not be executed.
Check failure detailed error message
The contents of this section are shown in PDF user manual only.
## Not run:
tbl < -as.data.frame(matrix(1:9, nrow = 3))
check_args(arg = tbl, type = c("data.frame"))
vec <- c("a", "b", "c")
check_args(arg = vec, type = c("character"), length = 3)
## End(Not run)Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.