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 <[EMAIL PROTECTED]>: > Dear all R users, > > Is there any function to omit repeated values in a vector? Your > help will be highly appreciated. > > Thanks > stat > > > --------------------------------- > Heres 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 ______________________________________________ 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-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.