Hello,
I have two column in a data.frame and I want to use some function for comparaison. For example intersect(). Because the length of the column are not the same, there is NA in there. However, when I use intersect, NA is considered that I do not want.
Example:
head(df)
A B
1 cat dog
2 dog elephant
3 duck
4
intersect(df$A,df$B)
[1] "dog" NA
Hope somebody can help me
Best
Antonin