Hi, I often run into this problem: I have a data.frame with one column containing entries that are not unique. What I then want is a subset of the data.frame in which the entries in that column have become the 'unique' of the original column. Normally I program around it by taking the unique of the column and making a new data.frame with it and filling the rest of the data.
(By the way, when moving to the smaller data.frame for example 5 rows with the same value in that column will be replaced by one row for that value. I don't mind which of the rows now..) something like this, however, this gives me the complete df. df[df$colname %in% unique(df$colname),] or this, which doesnt work df[df$colname == unique(df$colname),] regards, R. Alberts ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
