Displaying 1 result from an estimated 1 matches for "mycomp1".
Did you mean:
mycomp
2009 Aug 21
8
Selecting groups with R
...have a data set similar to the following:
Color Score
RED 10
RED 13
RED 12
WHITE 22
WHITE 27
WHITE 25
BLUE 18
BLUE 17
BLUE 16
and I am trying to to select just the values of Color that are equal to RED
or WHITE, excluding the BLUE.
I've tried the following:
myComp1<-subset(dataset, Color =="RED" | Color == "WHITE")
myComp1<-subset(dataset, Color != "BLUE")
myComp1<-dataset[which(dataset$Color != "BLUE"),]
Each of the above lines successfully excludes the BLUE subjects, but the
"BLUE" category is stil...