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.
_
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
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
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
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
5 matches
Mail list logo