[R] Omiting repeated values

Dimitris Rizopoulos Dimitris.Rizopoulos at med.kuleuven.be
Wed Feb 21 13:45:58 CET 2007


x <- sample(1:3, 20, TRUE)
x

# do you mean

unique(x)

# or

rle(x)$values


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
      http://www.student.kuleuven.be/~m0390867/dimitris.htm


Quoting stat stat <stat700004 at yahoo.co.in>:

> Dear all R users,
>
>   Is there any function to omit repeated values in a vector? Your   
> help will be highly appreciated.
>
>   Thanks
>   stat
>
>
> ---------------------------------
>  Here’s a new way to find what you're looking for - Yahoo! Answers
> 	[[alternative HTML version deleted]]
>
>



Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the R-help mailing list