[R] Remove

Ashta sewashm at gmail.com
Thu Dec 7 00:15:54 CET 2017


Hi all,
In a data set I have group(GR) and two variables   x and y. I want to
remove a  group that have  the same record for the x variable in each
row.

DM <- read.table( text='GR x y
A 25 125
A 23 135
A 14 145
A 12 230
B 25 321
B 25 512
B 25 123
B 25 451
C 11 521
C 14 235
C 15 258
C 10 654',header = TRUE, stringsAsFactors = FALSE)

In this example the output should contain group A and C  as group B
has   the same record  for the variable x .

The result will be
A 25 125
A 23 135
A 14 145
A 12 230
C 11 521
C 14 235
C 15 258
C 10 654

How do I do it R?
Thank you.



More information about the R-help mailing list