[R] delete repeated values - not unique...
Erik Iverson
eriki at ccbr.umn.edu
Tue Feb 16 19:13:25 CET 2010
Ah, the request was 'hidden' in the subject of the message, apologies!
Erik Iverson wrote:
> Well, can you algorithmically describe what you are trying to do? Your
> example is not sufficient to determine it. For instance, are you trying
> to:
>
> 1) remove repeated elements of a vector and concatenate the first
> element at the end?
>
> 2) remove repeated elements of a vector and concatenate the minimum
> element at the end?
>
> 3) always return the vector c(4, 5, 6, 4) ?
>
> 4) something else?
>
>
>
> jorgusch wrote:
>> Hello,
>>
>> I must be blind not to see it, but I have the following vector:
>>
>> 4
>> 4
>> 5
>> 6
>> 6
>> 4
>>
>> What I would like to have as a result is:
>>
>> 4
>> 5
>> 6
>> 4
>>
>> All repeated values are gone. I cannot use unique for this, as the
>> second 4
>> would disappear. Is there another fast function for this problem?
>>
>> Thanks in advance!
>>
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list