Re: [R] Positions in datasets

2009-12-27 Thread Anders Falk
Thank you both for your excellent help. Best Regards, Anders Falk > > > David Winsemius wrote: >> >> On Dec 27, 2009, at 12:11 PM, Anders Falk wrote: >> >>> Could someone help me understand this >>> >>> Basically I want to know the positio

Re: [R] Positions in datasets

2009-12-27 Thread Anders Falk
Could someone help me understand this Basically I want to know the position of certain numbers in large output data sets. First consider the following simple example where we get the postions of ones (1) in the vector q. > q <- c(5,1,1,3,1,1,1,1) > q [1] 5 1 1 3 1 1 1 1 > for (i in 1:length(q)) i