The easiest thing might be to just sort on the Loaded column:
start of example
d <- read.table(textConnection("ESR_ref ESR_ref_editLoaded
1.1 1.1 Y
1.1.11.1 NC
1.1.21.1 Y
2.1 2.1 N
2.1.
Thanks Gray,
This helps, I'd completely forgotten about the subset command. However, it
doesn't quite get me where I need. Perhaps an example will help. I will
simplify my dataframe to the three important variables:
ESR_ref ESR_ref_editLoaded
1.1 1.1 Y
1.1.1
Hi,
Try:
subset(Samps, !duplicated(Samps$ESR_ref_edit) | Samps$Loaded == "Y")
I'd need specific code to be sure that this is exactly what you want
(ie you specify input and desired output), but indexing with a logical
vector is probably going to be the solution.
Best,
Gray
On Wed, Dec 16, 2009
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 a
4 matches
Mail list logo