title: How to check if each element in a vector is integer or not in R?
body: <p>Say, I have a vector y, and I want to check if each element in y is integer or not, and if not, stop with an error message. I tried is.integer(y), but it does not work.</p>