checkListElementClass {BBmisc} | R Documentation |
Check that argument is a list and contains only elements of a required type. Throws exception if check is not passed. Note that argument is evaluated when checked.
checkListElementClass(xs, cl)
xs |
[ |
cl |
[ |
Nothing.
xs = as.list(1:3)
checkListElementClass(xs, "numeric")