Check that a list contains only elements of a required type.
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")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.