?unique
Arnau Mir wrote:
> Hello.
>
> I have a vector of length 2771 but it has only 87 different values.
> How can I obtain them?
>
> Thanks,
>
> Arnau.
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Arnau Mir
> Sent: Tuesday, March 14, 2006 12:45 PM
> To: r-help@stat.math.ethz.ch
> Subject: [R] different values of a vector
>
>
> Hello.
>
> I have a vector of length
On Tue, 2006-03-14 at 18:45 +0100, Arnau Mir wrote:
> Hello.
>
> I have a vector of length 2771 but it has only 87 different values.
> How can I obtain them?
>
> Thanks,
>
> Arnau.
If you just want the unique values themselves, you can use:
unique(vector)
For example:
> v
[1] "b" "b" "c"
Hello.
I have a vector of length 2771 but it has only 87 different values.
How can I obtain them?
Thanks,
Arnau.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-proje