[R] Get the location of a numeric element in a list
Mohammad Tanvir Ahamed
mashranga at yahoo.com
Tue Jun 28 09:03:11 CEST 2016
Can any one please help me. I will apply this for a very large list, about 400k vector in a list and vector size is unequal and large
Example :
Input:
a <- c(1,3,6,9,25,100)
b<-c(10,7,20,2,25)
c<-c(1,7,5,15,25,300,1000)
d<-list(a,b,c)
Expected outcome :
# When looking for 1 in d
c(1,3)
# When looking for 7 in d
c(2,3)
# when looking for 25 in d
c(1,2,3)
# When looking for 50 in d
NULL or 0
Thanks in advance !!
Tanvir Ahamed
Göteborg, Sweden | mashranga at yahoo.com
More information about the R-help
mailing list