search for: esr_ref_edit

Displaying 1 result from an estimated 1 matches for "esr_ref_edit".

2009 Dec 17
1
Remove duplicates from a data frame but with some special requirements
Hi all. So I have a data frame with multiple columns/variables. The first variable is a major sample name for which there are some sub-samples. Currently I have used the following command to remove the duplicates: Samps_working<-Samps[-c(which(duplicated(Samps$ESR_Ref_edit))),] This removes all of the duplicated sample rows. However, I just realised that, of course, this removes the first observation of each duplicated set. However, I wish to retain any that have the code "Y" in another variable Samps$Loaded. I'm at a bit of a loss as to how best to...