Re: [R] Remove duplicate elements in lists via recursive indexing

2011-05-23 Thread Janko Thyson
Hi Timothy, and thanks for the answer. Loops where exactly what I was trying to avoid as much as possible. My initial idea was that that once I had recursive indexes at my disposal (which were retrieved over recursive loops), I could simply use it in a similar manner as we do with indexes (t

Re: [R] Remove duplicate elements in lists via recursive indexing

2011-05-23 Thread Timothy Bates
Dear Janko, I think requires a for loop. The approach I took here was mark the dups, then dump them all in one hit: testData = expand.grid(letters[1:4],c(1:3)) testData$keep=F uniqueIDS = unique(testData$Var1) for(thisID in uniqueIDS) { firstCaseOnly = match(thisID,testData$Var1)