Clear and Condense Argument Check for User-Defined Functions
Checking if all elements of a list are all character vectors
Checking if all elements of a list are all integer vectors
Checking if the length of the different elements of a list corresponds...
Checking if all elements of a list are all logical vectors
Checking if all elements of a list are all integer or numeric vectors
Checking if all elements of a list are all numeric vectors
Checking if the value of a numeric or integer variable (of length 1) i...
Checking if the value of vectors (of length 1) is authorized.
A concise check of the format of one or multiple input arguments (data type, length or value) is provided. Since multiple input arguments can be tested simultaneously, a lengthly list of checks at the beginning of your function can be avoided, hereby enhancing the readability and maintainability of your code.