[R] Removing duplicates from a list

Gábor Csárdi csardi at rmki.kfki.hu
Wed Jan 14 14:30:45 CET 2009


On Wed, Jan 14, 2009 at 2:19 PM, glenn <g1enn.roberts at btinternet.com> wrote:
> For a list say;
>
> list1<-{1,2,3,4,5,2,1}

You mean

list1 <- list(1,2,3,4,5,2,1)

?? See ?unique

Gabor

>
> How do I remove the duplicates please?
> My real list is 20,000 obs long of dates with many duplicates
>
> Regards
>
> Glenn
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>



-- 
Gabor Csardi <Gabor.Csardi at unil.ch>     UNIL DGM




More information about the R-help mailing list