I have two vectors : vector1 and vector2 with same length. I would like to get only the value of vector1 where vector1 is not na, and where vector2 is not na. I tried with that code, but it doesn't work :
vector1step1<-ifelse(((is.na(vector1)==F)&(is.na(vector2)==F)), vector1, NA)
vector1step2<-vector1step1[!is.na(vector1step1)]
An idea ? Thank you in advance :)