testand <- selectBy(attitude, 'rating < 70 & complaints > 60') #AND
dim(testand)
testor <- selectBy(attitude, 'rating < 60 | complaints > 60') #OR
dim(testor)
test <- splitBy(attitude, 'rating > 70 , complaints > 60')
psych::headTail(test)
Run the code above in your browser using DataLab