About this question
Is there any shortcut method to find an index of an element in a vector, I have an element Q with me and a vector W and now I want to look out foe first index of an element Q which is equal to W, currently I am using which(Q == W)[[1]] but this is not sufficient I think.
Can someone answer this doubt?