On 3/11/2009 5:08 AM, Tammy Ma wrote:
> Hi,All.
>
> How to make a program to delete repeated value?
>
> a example
>
>> c
> [1] 4 3 0 3 4 1 0 1 4 4 3 4 3 4
>
> I want to get : 4 3 0 3 4 1 0 1 4 3 4 3 4
>
> two 4 is being represented by one 4.
x <- c(4, 3, 0, 3, 4, 1, 0, 1, 4, 4, 3, 4, 3, 4)
try this:
x <- c(4, 3, 0, 3, 4, 1, 0, 1, 4, 4, 3, 4, 3, 4)
rle(x)$values
I hope it helps.
Best,
Dimitris
Tammy Ma wrote:
Hi,All.
How to make a program to delete repeated value?
a example
c
[1] 4 3 0 3 4 1 0 1 4 4 3 4 3 4
I want to get : 4 3 0 3 4 1 0 1 4 3 4 3 4
two 4 is being repre
Hi,All.
How to make a program to delete repeated value?
a example
> c
[1] 4 3 0 3 4 1 0 1 4 4 3 4 3 4
I want to get : 4 3 0 3 4 1 0 1 4 3 4 3 4
two 4 is being represented by one 4.
Thanks.
Tammy
_
More than messages–check out
3 matches
Mail list logo