I already found out how to count cases based on two conditions:
sum(dat2$happy > 7 & dat2$induction == 1)
But do you know how I can indlude a range of values as a criteria? One out of many codes I tried:
sum(dat2[dat2$happy > 4 & dat2$happy < 8] & dat2$induction == 2)
Tank you so much!
Aucun commentaire:
Enregistrer un commentaire