sorry.. don't know unique().. such a great function
________________________________ From: Bert Gunter <gunter.ber...@gene.com> Cc: "r-help@r-project.org" <r-help@r-project.org> Sent: Tuesday, January 28, 2014 2:21 PM Subject: Re: [R] unique rows Inline. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." H. Gilbert Welch > Hi, I wanted to remove redundant rows (with same entry in columns) in a data > frame. For example, with this data frame: > >> dat<-cbind(x=c('a','a','b','b','c','c'),y=c('x','x','d','s','g','g')) ## this is not a data frame. And would you kindly explain why you posted here instead of reading ?unique. -- Bert >> dat > x y > [1,] "a" "x" > [2,] "a" "x" > [3,] "b" "d" > [4,] "b" "s" > [5,] "c" "g" > [6,] "c" "g" > > after removing the redundancy, the end results should be > > x y > [1,] "a" "x" > [2,] "b" "d" > [3,] "b" "s" > [4,] "c" "g" > > what is the best way to do this? > > Thanks > > John > [[alternative HTML version deleted]] > > > ______________________________________________ > R-help@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. > [[alternative HTML version deleted]]
______________________________________________ R-help@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.