powered by
checkVectLength checks argument 'x' for expected length 'expeL' and return either message or error when expectation not met. Used for parameter ('sanity') checking in other user front-end functions.
checkVectLength
checkVectLength( x, expeL = 1, stopOnProblem = FALSE, silent = FALSE, callFrom = NULL )
(numeric or charcter vector) input to check length
(numeric) expected length
(logical) continue on problems with message or stop (as error message)
(logical) suppress messages if TRUE
TRUE
(character) allows easier tracking of message(s) produced
NULL (produces only optional message if length is OK or error-message if length is not OK)
NULL
# NOT RUN { aa <- 1:5; checkVectLength(aa,exp=3) # }
Run the code above in your browser using DataLab