Message-ID: <7C366FE9-1802-48BE-BEBD-C3B7873A32FA@comcast.net>
Date: 2009-11-16T01:06:38Z
From: David Winsemius
Subject: pairs
In-Reply-To: <45cbed340911151426hd37387du1d2862c87a30e7b8@mail.gmail.com>
I could of course be wrong but have you yet specified the number of
columns for this pairing exercise?
On Nov 15, 2009, at 5:26 PM, cindy Guo wrote:
> Hi, All,
>
> I have an n by m matrix with each entry between 1 and 15000. I want
> to know
> the frequency of each pair in 1:15000 that occur together in rows.
> So for
> example, if the matrix is
> 2 5 1 6
> 1 7 8 2
> 3 7 6 2
> 9 8 5 7
> Pair (2,6) (un-ordered) occurs together in rows 1 and 3. I want to
> return
> the value 2 for this pair as well as that for all pairs. Is there a
> fast way
> to do this avoiding loops? Loops take too long.
>
> and provide commented, minimal, self-contained, reproducible code.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
David Winsemius, MD
Heritage Laboratories
West Hartford, CT