Re: [R] remove duplicates in data frame

2013-04-11 Thread S Ellison
> -Original Message- >> How do I find and remove the two duplicate rows? > Try ?unique() See also ?duplicated and consider the usage d[ !duplicated(d), ] where d is your data frame. But read the 'details' part of the help page closely... S Ellison *

Re: [R] remove duplicates in data frame

2013-04-08 Thread arun
Hi, Try ?unique() You haven't provided reproducible data or information about the package.  So, this may or may not work. dat1<- data.frame(idvar=c(rep(1,2),2,4),col2=c(7,7,8,9))  dat1 #  idvar col2 #1 1    7 #2 1    7 #3 2    8 #4 4    9  unique(dat1) #  idvar col2 #1 1    7