Re: [R] how to combine apply and which or alternative ways to, do so

2013-08-25 Thread Gerrit Draisma
Ha Guillaume, Is this what you are looking for? #--- x1<-sample(1:10,5,replace=FALSE) x2<-sample(1:10,100,replace=TRUE) #This tapply(x1,1:5,FUN=function(i){which(x2==i)}) #or this tapply(x1,x1,FUN=function(i){which(x2==i)}) #--- Gerrit ___

Re: [R] how to combine apply and which or alternative ways to do so

2013-08-24 Thread John Kane
how to combine apply and which or alternative ways to do so > > Dear useRs, > > I am currently doing some data cleaning and data manipulation and I have > the > following problem. > I have two vectors. Let say the size of the first one is 10 000 (vector > 1) > and the s

Re: [R] how to combine apply and which or alternative ways to do so

2013-08-23 Thread arun
ubject: [R] how to combine apply and which or alternative ways to do so Dear useRs, I am currently doing some data cleaning and data manipulation and I have the following problem. I have two vectors. Let say the size of the first one is 10 000 (vector 1) and the size of the second one is 1 000 000

[R] how to combine apply and which or alternative ways to do so

2013-08-23 Thread Guillaume Bal
Dear useRs, I am currently doing some data cleaning and data manipulation and I have the following problem. I have two vectors. Let say the size of the first one is 10 000 (vector 1) and the size of the second one is 1 000 000 (vector 2). I need to know for each cell of vector 1 which cells of v