: [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(&
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)
>
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
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 ve
4 matches
Mail list logo