validFCTs {BuyseTest} | R Documentation |
Check the validity of the arguments in functions.
validCharacter(value1, name1 = as.character(substitute(value1)), valid.length, valid.values = "character", refuse.NULL = TRUE, refuse.duplicates = FALSE, method = NULL, addPP = TRUE) validClass(value1, name1 = as.character(substitute(value1)), valid.class, type = "inherits", method = NULL, addPP = TRUE) validDimension(value1, value2 = NULL, name1 = as.character(substitute(value1)), name2 = as.character(substitute(value2)), valid.dimension = NULL, type = c("NROW", "NCOL"), method = NULL, addPP = TRUE) validInteger(value1, name1 = as.character(substitute(value1)), valid.length, valid.values = NULL, min = NULL, max = NULL, refuse.NA = TRUE, refuse.NULL = TRUE, refuse.duplicates = FALSE, method = NULL, addPP = TRUE) validLogical(value1, name1 = as.character(substitute(value1)), valid.length, refuse.NULL = TRUE, refuse.NA = TRUE, method = NULL, addPP = TRUE) validNames(value1, name1 = as.character(substitute(value1)), refuse.NULL = TRUE, valid.length = NULL, valid.values = NULL, required.values = NULL, refuse.values = NULL, method = NULL, addPP = TRUE) validNumeric(value1, name1 = as.character(substitute(value1)), valid.length, valid.values = NULL, min = NULL, max = NULL, refuse.NA = TRUE, refuse.NULL = TRUE, refuse.duplicates = FALSE, method = NULL, addPP = TRUE) validPath(value1, name1 = as.character(substitute(value1)), type, method = NULL, addPP = TRUE, extension = NULL, check.fsep = FALSE)
value1 |
the value of the (first) argument to be checked |
name1 |
the name of the (first) argument. |
valid.length |
the acceptable length(s) for the argument. If |
valid.values |
the acceptable value(s) for the argument. If |
refuse.NULL |
should an error be output if value is |
refuse.duplicates |
should an error be output if value contains duplicated values. |
method |
the name of the function using the argument. |
addPP |
add ": " after the name of the function in the error message. |
type |
For |
value2 |
the second value of a second argument whose dimensions should be consistent with the first one |
name2 |
the name of the second argument. |
min |
the minimum acceptable value |
max |
the maximum acceptable value |
refuse.NA |
should an error be output if value contains |
required.values |
values that must appear in the argument |
refuse.values |
values that must not appear in the argument |
extension |
filter the files by the type of extension. |
check.fsep |
display a warning when the separator is not correctly specified in |
validClass |
the acceptable classes(s) for the argument. |
validDimension |
the acceptable dimension for the argument. If |
super.classes |
uses the |
An invisible TRUE
or an error message.