How to check if entire vector has no values other than NA (or NAN) in R ?
If I use is.na it returns a vector of TRUE / FALSE.
I need to check if there is single not NA element or not.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The function
all(), when passed a Boolean vector, will tell you whether all of the values in it areTRUE: