Re: [R] Merging fully overlapping groups

2012-03-14 Thread mdvaan
Hi Jean and Peter, Thanks for the help. Both options are indeed faster than my initial procedure. Best, Mathijs -- View this message in context: http://r.789695.n4.nabble.com/Merging-fully-overlapping-groups-tp4470999p4473013.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Merging fully overlapping groups

2012-03-14 Thread Petr Savicky
On Tue, Mar 13, 2012 at 08:56:33PM -0700, mdvaan wrote: > Hi, > > I have data on individuals (B) who participated in events (A). If ALL > participants in an event are a subset of the participants in another event I > would like to remove the smaller event and if the participants in one event > are

Re: [R] Merging fully overlapping groups

2012-03-14 Thread Petr Savicky
On Tue, Mar 13, 2012 at 08:56:33PM -0700, mdvaan wrote: > Hi, > > I have data on individuals (B) who participated in events (A). If ALL > participants in an event are a subset of the participants in another event I > would like to remove the smaller event and if the participants in one event > are

Re: [R] Merging fully overlapping groups

2012-03-14 Thread Jean V Adams
This code performs the same operation in about 1/10th the time on my machine. Give it a try. look <- function(i) { # look for subsets dif <- m[, i] - m apply(dif, 2, min) > -0.5 } nosubsets <- function(df) { # eliminate events that are subsets of other even

[R] Merging fully overlapping groups

2012-03-14 Thread mdvaan
Hi, I have data on individuals (B) who participated in events (A). If ALL participants in an event are a subset of the participants in another event I would like to remove the smaller event and if the participants in one event are exactly similar to the participants in another event I would like t