I'm trying to make some code that I can run in a variety of situations. What I've done is define criterion that I'd like to drop subjects if they meet it:
drop1 <- subset(data,data$fast > .20)
Now I'm trying to subset my main data set to exclude those subjects that met the criteria for drop1:
maindata <- subset(maindata,maindata$subject != drop1$subject)
My problem is that in this particular example, no subjects met this criteria. Thus, my main data set drops to 0 observations. How can I fix this so I can use this basic format regardless if subjects meet the condition or not?
THANKS!