Hi,
the problem I have is seemingly very simple, but not simple enough for me to
figure out. I just want to find the most (or least) frequent element in the
vector.
a=c(Alice,Alice,Alice,Alice,Bob,Bob)
unique(a)
length(which(a==Alice))
unique(a) shows me that the elements in my vector are
On 3/30/2008 5:35 PM, Daniel Malter wrote:
Hi,
the problem I have is seemingly very simple, but not simple enough for me to
figure out. I just want to find the most (or least) frequent element in the
vector.
a=c(Alice,Alice,Alice,Alice,Bob,Bob)
unique(a)
length(which(a==Alice))
On Sun, 2008-03-30 at 17:35 -0400, Daniel Malter wrote:
Hi,
the problem I have is seemingly very simple, but not simple enough for me to
figure out. I just want to find the most (or least) frequent element in the
vector.
a=c(Alice,Alice,Alice,Alice,Bob,Bob)
unique(a)
: [R] maximum of identical elements in a vector
On 3/30/2008 5:35 PM, Daniel Malter wrote:
Hi,
the problem I have is seemingly very simple, but not simple enough for
me to figure out. I just want to find the most (or least) frequent
element in the vector.
a=c(Alice,Alice,Alice,Alice,Bob,Bob
4 matches
Mail list logo