Re: [R] help with repeated values

2009-12-06 Thread Carlos J. Gil Bellosta
Here you have an example: > colleges <- factor( c("a", "a", "b", "c", "c" )) > colleges [1] a a b c c Levels: a b c > table( colleges ) colleges a b c 2 1 2 > colleges.count <- table( colleges )[colleges] > colleges.count colleges a a b c c 2 2 1 2 2 > which( colleges.count > 1 ) a a c c 1 2 4 5

Re: [R] help with repeated values

2009-12-06 Thread Daniel Malter
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-boun...@r-project.org [mailto:r-h