I'm seeking to compare a set of values from one column and I need to know if each one is bigger than one, so I can print a warning message that probably there was a typo inserting values in the beginning.
i=1:nrow(data)
if (m1$residuals[i] > 1) {
print("typo")
}
This doesn't work, I get this message
Warning message:
In if (m1$residuals[i] > 1) { :
the condition has length > 1 and only the first element will be used
Why though?
Can someone tell me an alternative way to do it?
Thank you