[R] help with repeated values

Daniel Malter daniel at umd.edu
Mon Dec 7 03:16:47 CET 2009


college=c("Columbia","Columbia","Harvard","Harvard","NYU")

unique(college)
table(college)
unique(college)[table(college)>1]

HTH
Daniel 


-------------------------
cuncta stricte discussurus
-------------------------

-----Ursprüngliche Nachricht-----
Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im
Auftrag von Kristen Mark
Gesendet: Sunday, December 06, 2009 6:41 PM
An: r-help at r-project.org
Betreff: [R] help with repeated values

I have a huge college dataset and I want to be able to find which colleges
appear more than once in the dataset. How would I go about doing this? The
variable college is a factor. If I just do table(college) it is impossible
to find where there are repetitions. Any help would be greatly appreciated!

Lynna 


      
	[[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.




More information about the R-help mailing list