Re: [R] Keep ALL duplicate records

2011-10-03 Thread Erik Svensson
It worked, thank you Jim Erik -- View this message in context: http://r.789695.n4.nabble.com/Keep-ALL-duplicate-records-tp3865136p3867709.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.et

Re: [R] Keep ALL duplicate records

2011-10-02 Thread jim holtman
Here is a function I use to find all duplicate records > allDup <- function (value) { duplicated(value) | duplicated(value, fromLast = TRUE) } > x IDOS time 1 userA Win 12:22 2 userB OSX 23:22 3 userA Win 04:44 4 userC Win64 12:28 > x[allDup(x$ID),] ID OS time 1 userA Wi

Re: [R] Keep ALL duplicate records

2011-10-02 Thread Pete Brecknock
Erik Svensson wrote: > > Hello, > In a data frame I want to identify ALL duplicate IDs in the example to be > able to examine "OS" and "time". > > (df<-data.frame(ID=c("userA", "userB", "userA", "userC"), > OS=c("Win","OSX","Win", "Win64"), > time=c("12:22","23:22","04:44","12:28"))) > >