I have data frame like this
Subject stim GZMB TNF IFNg
HC no stim 1 1 0
EC 1100 0 1 0
CH no stim 0 0 1
I would like to subset the data such that I get the subject and stim values for which GZMB is 1 and all the others (TNF, IFNg) are zero.